Skip to content

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

Merged
maxenglander merged 2 commits into
mainfrom
maxeng/issues-gh-1753/refresh-state-by-shard
Jul 1, 2026
Merged

Add vtctld refresh-state-by-shard command#1269
maxenglander merged 2 commits into
mainfrom
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 2 times, most recently from a96bc5a to 52aa053 Compare June 10, 2026 02:13
@maxenglander maxenglander force-pushed the maxeng/issues-gh-1753/set-shard-tablet-control branch 2 times, most recently from f289d20 to e43aab3 Compare June 12, 2026 22:39
@maxenglander maxenglander force-pushed the maxeng/issues-gh-1753/refresh-state-by-shard branch from 103f7f8 to 099d193 Compare June 12, 2026 22:54
@maxenglander maxenglander force-pushed the maxeng/issues-gh-1753/set-shard-tablet-control branch from e43aab3 to a6885b2 Compare June 15, 2026 17:45
Base automatically changed from maxeng/issues-gh-1753/set-shard-tablet-control to main June 22, 2026 22:42
@maxenglander maxenglander force-pushed the maxeng/issues-gh-1753/refresh-state-by-shard branch from 099d193 to 9683ffd Compare June 22, 2026 22:51
@maxenglander maxenglander marked this pull request as ready for review June 23, 2026 00:17
@maxenglander maxenglander requested a review from a team as a code owner June 23, 2026 00:17
@maxenglander maxenglander force-pushed the maxeng/issues-gh-1753/refresh-state-by-shard branch from 9683ffd to c78c55f Compare July 1, 2026 20:01
maxenglander and others added 2 commits July 1, 2026 17:13
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 c78c55f to b67a1f4 Compare July 1, 2026 21:14
@maxenglander maxenglander merged commit c018f92 into main Jul 1, 2026
4 checks passed
@maxenglander maxenglander deleted the maxeng/issues-gh-1753/refresh-state-by-shard branch July 1, 2026 21:21
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.

2 participants