Repository navigation
feat(git): make the coordinated snapshot startup spread configurable - #49
Merged
Merged
Conversation
Add `snapshot-startup-spread` (default 5m, unchanged) so deployments and integration fixtures that start replicas one at a time can register their first coordinated snapshot run without the random delay.
wvanlint-pplx
force-pushed
the
wvanlint/snapshot-startup-spread
branch
from
November 23, 2026 19:53
791c5d0 to
fc1cb04
Compare
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.
Problem
When replicas coordinate snapshots through shared metadata, each one waits a random 0–5 minutes (
snapshotStartupSpread, hardcoded) before its first periodic snapshot. That protects simultaneous deploys, but deployments and integration fixtures that already start replicas one at a time can't turn it off. A two-replica coordination fixture that starts its producer and peer one after the other waits through two of these delays (~5 min on average, up to 10 min), even though generating the snapshot takes ~80ms and the peer's skip ~2ms.Change
Add a
snapshot-startup-spreadsetting tostrategy git. It defaults to5m, the current value, so existing deployments behave the same.0turns the delay off. Interval jitter and claim coordination are unchanged.Validation
go test ./internal/...andtskpass. In a downstream two-replica coordination test, settingsnapshot-startup-spread = "0s"took the test from 262s to 23.5s locally.