Skip to content

Support async MoveTables vtctld operations#293

Merged
nickvanw merged 2 commits intomainfrom
nickvanw/async-movetables
Mar 9, 2026
Merged

Support async MoveTables vtctld operations#293
nickvanw merged 2 commits intomainfrom
nickvanw/async-movetables

Conversation

@nickvanw
Copy link
Copy Markdown
Contributor

@nickvanw nickvanw commented Mar 9, 2026

Summary

  • Match the merged async MoveTables API so the Go SDK starts switch-traffic, reverse-traffic, and complete by returning an accepted operation id instead of waiting for long-running vtctld work to finish in request scope.
  • Add generic vtctld operation polling on the existing Vtctld service so callers can wait for the final typed result without each command inventing its own polling client.
  • Preserve backend validation semantics by mapping bad_request responses to ErrInvalid.

Changes

  • change the three async MoveTables mutation methods to return VtctldOperationReference, including support for the merged rename_tables complete option
  • add Vtctld.GetOperation plus request and response types for decoding the generic vtctld/operations/:id resource, keeping metadata and result as raw JSON for action-specific payloads
  • update MoveTables and client tests to cover accepted responses, operation polling, and bad_request error handling

Notes

  • This is a public SDK behavior change for those three MoveTables mutation methods; callers now need to poll Vtctld.GetOperation to retrieve the eventual result payload.

@nickvanw nickvanw requested a review from a team as a code owner March 9, 2026 20:05
@nickvanw nickvanw merged commit 0cf482d into main Mar 9, 2026
4 checks passed
@nickvanw nickvanw deleted the nickvanw/async-movetables branch March 9, 2026 21:17
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