Skip to content

fix(localscale): harden vitess control targeting#196

Merged
aparajon merged 1 commit into
mainfrom
aparajon/localscale-shard-control
May 31, 2026
Merged

fix(localscale): harden vitess control targeting#196
aparajon merged 1 commit into
mainfrom
aparajon/localscale-shard-control

Conversation

@aparajon
Copy link
Copy Markdown
Collaborator

@aparajon aparajon commented May 29, 2026

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_MIGRATION behavior while avoiding broad ALL operations for deploy-scoped cancel/complete actions.

What

  • Run cancel/complete per matching migration UUID on the owning keyspace connection
  • Fail closed when a deploy-scoped Vitess row is missing UUID, keyspace, or shard metadata
  • Add a reusable shard-targeted connection helper for LocalScale cleanup and inspection paths

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

Copilot AI review requested due to automatic review settings May 29, 2026 16:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 vtgateTargetConn helper 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.

Comment thread pkg/localscale/handlers_actions.go Outdated
@aparajon aparajon force-pushed the aparajon/localscale-shard-control branch 3 times, most recently from 2e01bdd to de7e32a Compare May 29, 2026 17:58
@aparajon aparajon changed the title fix(localscale): target vitess control by shard fix(localscale): harden vitess control targeting May 29, 2026
@aparajon aparajon force-pushed the aparajon/localscale-shard-control branch 2 times, most recently from 91f4b25 to 9c54f78 Compare May 30, 2026 17:22
@aparajon aparajon force-pushed the aparajon/localscale-shard-control branch from 9c54f78 to ead255a Compare May 30, 2026 17:24
@aparajon aparajon marked this pull request as ready for review May 31, 2026 02:40
@aparajon aparajon requested review from Kiran01bm and morgo as code owners May 31, 2026 02:40
@aparajon aparajon merged commit 9c2c1bb into main May 31, 2026
24 checks passed
@aparajon aparajon deleted the aparajon/localscale-shard-control branch May 31, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants