-
Notifications
You must be signed in to change notification settings - Fork 2.3k
VReplication: Add --shards flag to MoveTables/Reshard start and stop commands #19023
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
VReplication: Add --shards flag to MoveTables/Reshard start and stop commands #19023
Conversation
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
|
|
📝 Documentation updates detected! New suggestion: Add --shards flag to MoveTables and Reshard start/stop commands |
|
📝 Documentation updates detected! New suggestion: Add changelog entry for VReplication --shards flag |
mattlord
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @varundeepsaini !
There's more work to be done on the client side -- as we're not passing the shards in the request:
vitess/go/cmd/vtctldclient/command/vreplication/common/update.go
Lines 139 to 148 in 802b55e
| // The only thing we're updating is the state. | |
| req := &vtctldatapb.WorkflowUpdateRequest{ | |
| Keyspace: workflowOptions.Keyspace, | |
| TabletRequest: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ | |
| Workflow: workflowUpdateOptions.Workflow, | |
| Cells: textutil.SimulatedNullStringSlice, | |
| TabletTypes: textutil.SimulatedNullTabletTypeSlice, | |
| State: &state, | |
| }, | |
| } |
It's a different call path for workflow stop/start:
vitess/go/cmd/vtctldclient/command/vreplication/workflow/state.go
Lines 78 to 88 in 802b55e
| // The only thing we're updating is the state. | |
| req := &vtctldatapb.WorkflowUpdateRequest{ | |
| Keyspace: baseOptions.Keyspace, | |
| TabletRequest: &tabletmanagerdatapb.UpdateVReplicationWorkflowRequest{ | |
| Workflow: baseOptions.Workflow, | |
| Cells: textutil.SimulatedNullStringSlice, | |
| TabletTypes: textutil.SimulatedNullTabletTypeSlice, | |
| State: &state, | |
| Shards: shards, | |
| }, | |
| } |
We should also add some test coverage for this.
|
hey @mattlord , |
|
@varundeepsaini I literally cannot be more specific. :-) The issue will auto-close w/o any progress in the coming weeks. |
Signed-off-by: Varun Deep Saini <[email protected]>
Signed-off-by: Varun Deep Saini <[email protected]>
Signed-off-by: Varun Deep Saini <[email protected]>
479fc31 to
986504d
Compare
|
hey @mattlord |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19023 +/- ##
==========================================
+ Coverage 69.90% 69.91% +0.01%
==========================================
Files 1613 1613
Lines 216076 216085 +9
==========================================
+ Hits 151055 151085 +30
+ Misses 65021 65000 -21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mattlord
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @varundeepsaini ! Thank you ❤️
mhamza15
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
|
📝 Documentation updates detected! New suggestion: Add --shards flag to MoveTables and Reshard start/stop command docs |
Description
Adds support for the
--shardsflag to thestartandstopcommands for MoveTables and Reshard VReplication workflows. This allows users to start or stop workflows on a specific subset of shards rather than all shards at once.Related Issue(s)
Fixes: #18949
Checklist
Deployment Notes
No deployment notes. This is a CLI enhancement with no database migrations or breaking changes.
AI Disclosure
This PR was authored with assistance from Claude.