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
There are various places where we're not uniquely identifying a workflow when we issue an update -- either using the id field or the workflow name field:
go/vt/vtctl/workflow/resharder.go: query := fmt.Sprintf("update _vt.vreplication set state='Running' where db_name=%s", encodeString(targetPrimary.DbName()))
go/vt/wrangler/resharder.go: query := fmt.Sprintf("update _vt.vreplication set state='Running' where db_name=%s", encodeString(targetPrimary.DbName()))
go/vt/vtctl/workflow/stream_migrator.go: query := fmt.Sprintf("update _vt.vreplication set state='Running', stop_pos=null, message='' where db_name=%s and workflow != %s", encodeString(source.GetPrimary().DbName()), encodeString(sm.ts.ReverseWorkflowName()))
go/vt/wrangler/traffic_switcher.go: query := fmt.Sprintf("update _vt.vreplication set state='Running', message='' where db_name=%s", encodeString(source.GetPrimary().DbName()))
go/vt/vtctl/workflow/traffic_switcher.go: query := fmt.Sprintf("update _vt.vreplication set state='Running', message='' where db_name=%s", encodeString(source.GetPrimary().DbName()))
A big one is in the traffic switcher. The leads to errant states when you have multiple active workflows that you are switching traffic back and forth for.
The original commerce2customer_customer workflow should still be stopped and frozen, but it's also running when we reverse traffic for the commerce2customer_corder workflow. That is due to the query issued here w/o the workflow name (same in the vtctlclient/wrangler client code and the vtctldclient/server code):
The test case fails because when switching writes for a ReverseTraffic, the original workflow is the reverse one and it unfroze and started both of them.
Binary Version
vtgate version Version: 19.0.0-SNAPSHOT (Git revision 50241809572f2f4b0fbd03251a502030e07a2c13 branch 'main') built on Fri Dec 15 18:04:48 EST 2023 by matt@pslord.local using go1.21.5 darwin/arm64
Operating System and Environment details
N/A
Log Fragments
No response
The text was updated successfully, but these errors were encountered:
Overview of the Issue
There are various places where we're not uniquely identifying a workflow when we issue an update -- either using the
id
field or theworkflow
name field:A big one is in the traffic switcher. The leads to errant states when you have multiple active workflows that you are switching traffic back and forth for.
Reproduction Steps
The original
commerce2customer_customer
workflow should still be stopped and frozen, but it's also running when we reverse traffic for thecommerce2customer_corder
workflow. That is due to the query issued here w/o the workflow name (same in the vtctlclient/wrangler client code and the vtctldclient/server code):vitess/go/vt/wrangler/traffic_switcher.go
Lines 1613 to 1619 in 7c9fec7
The test case fails because when switching writes for a ReverseTraffic, the original workflow is the reverse one and it unfroze and started both of them.
Binary Version
vtgate version Version: 19.0.0-SNAPSHOT (Git revision 50241809572f2f4b0fbd03251a502030e07a2c13 branch 'main') built on Fri Dec 15 18:04:48 EST 2023 by matt@pslord.local using go1.21.5 darwin/arm64
Operating System and Environment details
Log Fragments
No response
The text was updated successfully, but these errors were encountered: