fix(deploy): settle in-flight replaces and back off between recovery retries#4985
Draft
rianmcguirefly wants to merge 1 commit into
Draft
fix(deploy): settle in-flight replaces and back off between recovery retries#4985rianmcguirefly wants to merge 1 commit into
rianmcguirefly wants to merge 1 commit into
Conversation
…retries The recovery retry loop re-issued updates over every still-differing machine with no wait for the prior operation to settle and a fixed 1s backoff. Against a fast-restarting / mid-replace app this stacked a fresh update on top of an in-flight replace, which flaps aborts as "concurrent update in progress" — the abort storm seen in the incident — and it repeatedly re-read machines mid-transition. - Before re-issuing updates on a retry, wait for any machine that is currently `replacing` to reach a stable state (best-effort, bounded by waitTimeout). - Replace the fixed 1s retry sleep with capped exponential backoff, giving a churning app time to steady rather than piling on colliding updates. Leases already carry across retries (appState copies the nonce from the prior state onto the re-fetched machines), so no lease-acquisition change is needed; the collisions were temporal, not lease-ownership, and the settle-wait targets that directly. Adds TestRetryBackoff and TestWaitForReplacingMachinesToSettle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The recovery retry loop re-issued updates over every still-differing machine with no wait for the prior operation to settle and a fixed 1s backoff. Against a fast-restarting / mid-replace app this stacked a fresh update on top of an in-flight replace, which flaps aborts as "concurrent update in progress", and it repeatedly re-read machines mid-transition.
replacingto reach a stable state (best-effort, bounded by waitTimeout).Leases already carry across retries (appState copies the nonce from the prior state onto the re-fetched machines), so no lease-acquisition change is needed; the collisions were temporal, not lease-ownership, and the settle-wait targets that directly.
Adds TestRetryBackoff and TestWaitForReplacingMachinesToSettle.
Change Summary
What and Why:
How:
Related to:
Documentation