Repository navigation
Conversation
A copy-and-swap run whose cutover spent every lock attempt left the verdict's attempts at zero, so automation could not tell an exhausted bounded retry from a single cancelled attempt as it can for a native step.
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.
A copy-and-swap run that stops because its cutover spent every lock attempt now reports how many attempts it made in the verdict's
attemptsfield.Why
A copy-and-swap run builds a full copy of the table and then swaps it in, which needs a brief exclusive lock. If a reader or writer holds the table through every try, the run stops with
code: budget-lock-exceededso it can be resumed later. The verdict'sattemptsfield exists to tell automation how many bounded tries ran, but it was only filled for native statements, so a stopped copy-and-swap run always read as zero tries.What
Verdict.Attemptson a failed copy-and-swap verdict from the*schemachange.LockRetriesExhaustedErrorthe swap returns. This coversmigrate.RunandRunDesired, which share the same verdict builder.attemptsat zero (omitted), matching a native step that never asked for its lock.budget-lock-exceededentry indocs/schemabot-integration.md, and the JSON example indocs/cli-output-examples.md.Before / after
A report keeps a transaction open on
public.orderswhile a--block-writesrun with--cutover-attempts 2reaches its cutover. Both tries wait for the reader and give up, and the run stops. Nothing else about the stop changes (code, fence, checkpoint row,lock_holder). The only difference is that the JSON verdict now says two tries ran.A live run (no
--block-writes) that the same reader outlasts before its cutover still has noattemptsfield, because it never made a swap attempt.