Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: vtctldclient implementation of SwitchReads is not working correctly #15594

Closed
mattlord opened this issue Mar 29, 2024 · 1 comment · Fixed by #15579
Closed

Bug Report: vtctldclient implementation of SwitchReads is not working correctly #15594

mattlord opened this issue Mar 29, 2024 · 1 comment · Fixed by #15579

Comments

@mattlord
Copy link
Contributor

mattlord commented Mar 29, 2024

Overview of the Issue

We added the new vtctldclient implementation of VReplication commands such as MoveTraffic and Reshard in Vitess 18.0. Much of the existing endtoend (e2e) tests at the time continued to use the now legacy vtctlclient client, however.

In moving one of the main VReplication endtoend tests, TestBasicV2Workflows which focuses on Reshard, to use vtctldclient it uncovered bugs related to how switching of traffic for replica and rdonly tablets was done:

  1. The --cells flag value was not getting passed through from client (vtctldclient) to server (vtctld) which is needed when switching reads in a subset of cells
  2. When switching reads for a Reshard workflow specifically, we were were incorrectly managing the direction and its relationship to the source and target — when the source and target, based on the direction, are already setup when building the traffic switcher — and thus SwitchTraffic/ReverseTraffic for Reshard did not work correctly

Reproduction Steps

Update the TestBasicV2Workflows test to use vtctldclient instead of vtctlclient and run it:

go test -count 1 -v -failfast -timeout 15m -run TestBasicV2Workflows vitess.io/vitess/go/test/endtoend/vreplication

Binary Version

vtgate version Version: 20.0.0-SNAPSHOT (Git revision 308f1fc5f0feac229f817bb30ef3b6fd0fe1fca9 branch 'main') built on Tue Mar 26 13:07:27 EDT 2024 by [email protected] using go1.22.1 darwin/arm64

Operating System and Environment details

N/A

Log Fragments

No response

@mattlord
Copy link
Contributor Author

Fixed in #15579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
1 participant