Skip to main content

STALENESS_FACTOR

Constant STALENESS_FACTOR 

Source
pub const STALENESS_FACTOR: u32 = 10;
Expand description

How long WITH WORK STUCK ON IT and no success before a standby is STALE.

Ten times the retry ceiling. A multiple of the retry rather than a wall-clock constant, because that is the number that separates “this has stopped working” from “this is between attempts”: at the cap the worker tries every DEFAULT_RETRY_MAX, so ten missed attempts in a row is not a slow standby, it is a broken one. With the shipped defaults, 50 minutes.

🔴 The threshold on its own was the whole test until 2026-08-31, and on its own it is a clock that stops: with nothing to replicate, every healthy standby crosses it and the row shouts STALE at an operator who has done nothing wrong. is_stale is the other half — see Verdict.