VReplication: Fix vtctldclient SwitchReads related bugs and move the TestBasicV2Workflows e2e test to vtctldclient#15579
Conversation
And get the tests passing again with minor fixes. Signed-off-by: Matt Lord <mattalord@gmail.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Matt Lord <mattalord@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15579 +/- ##
==========================================
- Coverage 67.41% 65.77% -1.65%
==========================================
Files 1560 1561 +1
Lines 192752 194874 +2122
==========================================
- Hits 129952 128183 -1769
- Misses 62800 66691 +3891 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
adf88a7 to
9cef32d
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
9cef32d to
d65c345
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
| } | ||
|
|
||
| func (ts *trafficSwitcher) switchShardReads(ctx context.Context, cells []string, servedTypes []topodatapb.TabletType, direction TrafficSwitchDirection) error { | ||
| var fromShards, toShards []*topo.ShardInfo |
There was a problem hiding this comment.
What changed that we don't need this code anymore? Are we initializing the source and target shards differently ?
There was a problem hiding this comment.
Nothing changed. It just wasn't correct. When building the traffic switcher in the vtctldclient implementation we determine the source and target based on the direction. So this was incorrectly doing something equivalent to what we do in the vtctlclient implementation, when we shouldn't be. It resulted in test failures.
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Description
This work was originally done via #15536 as I only planned to do that work in the
vtctldclientimplementation and thus I needed to use vtctldclient in order to test the fix. In doing so, I saw other test failures when using thevtctldclientimplementation and I fixed those there as well.BUT, because I did not plan to backport that PR and it still remains to be seen how involved/intrusive a full fix may be and also when it will be ready, I'm moving the work not specifically related to that issue here so it can be pushed ASAP and backported to v18 (where the vreplication commands were first added to
vtctldclient).I would like to backport this to v18 so that we have the traffic switching fixes and so that we have better test coverage now that we want all users to use
vtctldclient.Related Issue(s)
Checklist