Skip to content

Add vtctld refresh-state-by-shard command#1269

Draft
maxenglander wants to merge 3 commits into
maxeng/issues-gh-1753/set-shard-tablet-controlfrom
maxeng/issues-gh-1753/refresh-state-by-shard
Draft

Add vtctld refresh-state-by-shard command#1269
maxenglander wants to merge 3 commits into
maxeng/issues-gh-1753/set-shard-tablet-controlfrom
maxeng/issues-gh-1753/refresh-state-by-shard

Conversation

@maxenglander

@maxenglander maxenglander commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Adds a hidden vtctld command to reload tablet records for all tablets in a shard:

pscale branch vtctld refresh-state-by-shard <database> <branch> \
  --keyspace <keyspace> --shard <shard>

Optional --cells limits refresh to specific cells (comma-separated).

Depends on planetscale/planetscale-go#316.

Manual testing

Tested end-to-end against a dev Vitess branch (org with direct_vtctld_access enabled) with the full stack deployed.

  1. pscale branch vtctld refresh-state-by-shard test-vtctld main --keyspace test-vtctld --shard - returned {}.
  2. vtctld pod logs confirmed the command reached the cluster:
    RefreshTabletsByShard called on shard test-vtctld/-
    Calling RefreshState on tablet aws_useast1a_3-3832652810
    Calling RefreshState on tablet aws_useast1b_3-2825515151
    Calling RefreshState on tablet aws_useast1c_3-3300095745
    
    All three tablets in the unsharded shard received RefreshState (one per cell).

@maxenglander maxenglander force-pushed the maxeng/issues-gh-1753/refresh-state-by-shard branch from cd39db4 to a96bc5a Compare June 9, 2026 22:02
maxenglander and others added 2 commits June 9, 2026 22:12
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Max Englander <max@planetscale.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Max Englander <max@planetscale.com>
@maxenglander maxenglander force-pushed the maxeng/issues-gh-1753/refresh-state-by-shard branch from a96bc5a to 52aa053 Compare June 10, 2026 02:13
@maxenglander maxenglander force-pushed the maxeng/issues-gh-1753/set-shard-tablet-control branch from 27c1ed7 to fc3b72f Compare June 10, 2026 02:13
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Max Englander <max@planetscale.com>
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.

1 participant