Overview of the Issue
VStreams do not stream any data while streaming using the vtgate VStream API If
The rowstreamer starts streaming, but it gets permanently throttled before a single row is streamed and the copy phase times out.
I am also able to reproduce this in the MoveTables step of the local example if tablet_type is set just to replica.
If we modify local_example.sh to enable the throttler, MoveTables never moves out of the copy phase.
./101_initial_cluster.sh
vtctlclient -- UpdateThrottlerConfig --enable --threshold 5.0 commerce
Reproduction Steps
- Run
local_example upto ./201_customer_tablets.sh, so that the commerce keyspace is setup and populated
- Enable the throttler:
vtctlclient -- UpdateThrottlerConfig --enable --threshold 5.0 commerce
- Modify
examples/local/vstream_client.go to stream from commerce and from replica
reader, err := conn.VStream(ctx, topodatapb.TabletType_REPLICA, vgtid, filter, flags)
- Stream using the VStream API:
go run examples/local/vstream_client.go
- Nothing gets streamed
- In a different terminal disable the throttler:
vtctlclient -- UpdateThrottlerConfig --disable commerce
- Data is streamed
Binary Version
`main` at `18ab80e26b71bc25c11ec11919c5b9361576a160`
Operating System and Environment details
Log Fragments
I0528 11:08:25.236309 611413 uvstreamer.go:405] Stream() called
I0528 11:08:25.236349 611413 uvstreamer.go:410] TablePKs is not nil: starting vs.copy()
I0528 11:08:25.236352 611413 copy.go:50] catchupAndCopy for customer
I0528 11:08:25.236354 611413 copy.go:58] catchupAndCopy: before copyTable customer
I0528 11:08:25.236358 611413 copy.go:214] Starting copyTable for customer, PK []
I0528 11:08:25.236363 611413 engine.go:279] Streaming rows for query select * from customer, lastpk: []
I0528 11:08:25.238083 611413 rowstreamer.go:291] Streaming query: select customer_id, email from customer order by customer_id
I0528 11:08:25.238300 611413 snapshot_conn.go:121] Locking table customer for copying
I0528 11:08:25.238636 611413 snapshot_conn.go:114] Tables unlocked: customer
I0528 11:12:17.104444 611413 rowstreamer.go:346] Stream ended because of ctx.Done
I0528 11:12:17.104667 611413 uvstreamer.go:412] uvstreamer.Stream() copy returned with err stream ended: context canceled
Overview of the Issue
VStreams do not stream any data while streaming using the
vtgateVStream APIIfreplicalag throttler(https://vitess.io/docs/16.0/reference/features/tablet-throttler)The
rowstreamerstarts streaming, but it gets permanently throttled before a single row is streamed and the copy phase times out.I am also able to reproduce this in the
MoveTablesstep of the local example iftablet_typeis set just toreplica.If we modify
local_example.shto enable the throttler, MoveTables never moves out of the copy phase.Reproduction Steps
local_exampleupto./201_customer_tablets.sh, so that thecommercekeyspace is setup and populatedvtctlclient -- UpdateThrottlerConfig --enable --threshold 5.0 commerceexamples/local/vstream_client.goto stream fromcommerceand from replicareader, err := conn.VStream(ctx, topodatapb.TabletType_REPLICA, vgtid, filter, flags)go run examples/local/vstream_client.govtctlclient -- UpdateThrottlerConfig --disable commerceBinary Version
Operating System and Environment details
Log Fragments