Skip to content

feat(git): make the coordinated snapshot startup spread configurable - #49

Merged
ravi-pplx merged 1 commit into
pplx/mainfrom
wvanlint/snapshot-startup-spread
Nov 23, 2026
Merged

ravi-pplx merged 1 commit into
pplx/mainfrom
wvanlint/snapshot-startup-spread

Conversation

@wvanlint-pplx

@wvanlint-pplx wvanlint-pplx commented Nov 23, 2026 •

Copy link
Copy Markdown

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-spread setting to strategy git. It defaults to 5m, the current value, so existing deployments behave the same. 0 turns the delay off. Interval jitter and claim coordination are unchanged.

Validation

go test ./internal/... and tsk pass. In a downstream two-replica coordination test, setting snapshot-startup-spread = "0s" took the test from 262s to 23.5s locally.

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
wvanlint-pplx force-pushed the wvanlint/snapshot-startup-spread branch from 791c5d0 to fc1cb04 Compare November 23, 2026 19:53
@ravi-pplx
ravi-pplx merged commit dcd93d1 into pplx/main Nov 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants