You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query:=fmt.Sprintf("select table_name, lastpk from _vt.copy_state where vrepl_id = %d and id in (select max(id) from _vt.copy_state where vrepl_id = %d group by vrepl_id, table_name)",
When there are a lot of VStreams, this takes so long that the entire SwitchTraffic times out ends up in partially completed state.
Use Case(s)
Until recently, Vitess did not support changing the primary Vindex during MoveTables. Now it does. For Vitess clusters with lots of shards, say 128, a MoveTables operation to change a primary Vindex would involve 16384 VStreams. While each of the calls to get the copy state of those VStreams would be fast, in aggregate they can result in a SwitchTraffic timeout.
The text was updated successfully, but these errors were encountered:
Feature Description
During
MoveTables SwitchTraffic
, there is a phase where wrangler queries thecopystate
of every VStream:SwitchTraffic
callscanSwitch
vitess/go/vt/wrangler/workflow.go
Line 517 in b3f4202
getStreams
, which loads every VStream in the target keyspacevitess/go/vt/wrangler/vexec.go
Lines 705 to 725 in b3f4202
vitess/go/vt/wrangler/vexec.go
Lines 736 to 743 in b3f4202
VReplicationExec
callvitess/go/vt/wrangler/vexec.go
Lines 905 to 909 in b3f4202
When there are a lot of VStreams, this takes so long that the entire
SwitchTraffic
times out ends up in partially completed state.Use Case(s)
Until recently, Vitess did not support changing the primary Vindex during
MoveTables
. Now it does. For Vitess clusters with lots of shards, say 128, aMoveTables
operation to change a primary Vindex would involve 16384 VStreams. While each of the calls to get the copy state of those VStreams would be fast, in aggregate they can result in aSwitchTraffic
timeout.The text was updated successfully, but these errors were encountered: