Expand description
Exponential backoff with jitter, and the “has this retry window run out” check that goes with it. Shared by every worker that reschedules a failed row instead of giving up on it outright.
Functions§
- exponential_
backoff_ secs base_secs * 2^attempt, capped atmax_secs.attemptis clamped to keep the shift in range ofi64.- next_
attempt_ at now + delay_secs, plus a uniformly random0..=jitter_max_secsso a batch that failed together does not all come back at once.- window_
expired - Whether
max_age_secshave passed sincereference.None(never failed) is never expired.