pub async fn await_commit_recovery(subject: &str, log: impl Fn(&str)) -> boolExpand description
Wait for system commit to recover above RESUME_FLOOR_MB, probing with
exponential backoff (BACKOFF_START → BACKOFF_CAP). Returns true once
recovered, or false if OOM_RELAUNCH_DEADLINE elapses first (the caller
then gives up gracefully). log is the launcher’s logger, threaded in so the
wait is observable in the launcher log.
subject names whatever is being waited on for the two terminal log
lines (“relaunching {subject}” / “giving up {subject} relaunch”) — this
function is shared by the host-OOM wait (subject: "host") and the
srv-OOM wait (subject: "srv", SPEC_MEMORY_PRESSURE_SUPERVISION’s srv
counterpart). Hardcoding “host” here made the srv-OOM wait’s log
misleadingly claim it was relaunching the host during an actual srv-OOM
incident — reagent P1 on PR #2206.