Skip to main content

Module warm_state

Module warm_state 

Source
Expand description

Startup cache-warm lifecycle shared by the partition, registry, and standalone launch paths.

Warm walks run on detached background threads (fast startup); this type makes their completion observable so /health can gate on it instead of answering “ok” while the first queries still race the walk. Usage: create one shared WarmState per process, track a name before spawning each walk, and complete it when the walk finishes — on success and failure (a failed walk must never hold readiness forever).

Structs§

WarmState
Tracks named cache-warm walks and whether they have all finished.

Constants§

WARM_MAX_WAIT
Longest wait for a warm walk before callers stop gating readiness on it. Past this the walk is reported stuck (stderr once, plus the health body) and the server serves without a full warm — correct results, cold blocks.