fix(localscale): harden vitess control targeting#196
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates LocalScale Vitess migration control to target shard-specific vtgate connections, aiming to make cancel/complete actions reliable for multi-shard keyspaces.
Changes:
- Adds a reusable
vtgateTargetConnhelper for keyspace+shard-targeted vtgate connections. - Reuses the helper in
forEachShard. - Changes deploy migration control to collect shard targets and run control statements per target.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pkg/localscale/helpers.go |
Adds shard-targeted connection helper and applies it to shard iteration. |
pkg/localscale/handlers_actions.go |
Updates Vitess migration cancel/complete logic to operate on shard targets. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2e01bdd to
de7e32a
Compare
91f4b25 to
9c54f78
Compare
Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019e7459-7810-70b1-8ca8-d49708482878
9c54f78 to
ead255a
Compare
morgo
approved these changes
May 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
LocalScale Vitess control operations need to be precise when a deploy request has rows across multiple shards. The control path should keep Vitess's keyspace-targeted
ALTER VITESS_MIGRATIONbehavior while avoiding broadALLoperations for deploy-scoped cancel/complete actions.What
Risk Assessment
Low — this is scoped to LocalScale's Vitess deploy-request control path and preserves keyspace-targeted Vitess control semantics while tightening deploy scoping.
Generated with Amp