fix(wake): #927 enqueue TOCTOU — move stale-tmp cleanup off the hot enqueue path (no concurrent in-flight-write clobber) (#928)
Co-authored-by: jason.woltje <jason@diversecanvas.com> Co-committed-by: jason.woltje <jason@diversecanvas.com>
This commit was merged in pull request #928.
This commit is contained in:
@@ -318,6 +318,13 @@ cmd_poll_once() {
|
||||
fi
|
||||
|
||||
_wake_init_dir "$STATE_DIR"
|
||||
# Detector-run maintenance stale-tmp reap (#927). Stale-tmp cleanup was moved
|
||||
# OFF the per-enqueue hot path (it clobbered concurrent in-flight writes); the
|
||||
# detector poll tick is a natural once-per-pass maintenance point that bounds
|
||||
# crash-left tmp accumulation on the long-running co-feed daemon. Age-scoped,
|
||||
# so it can never delete a live in-flight enqueue write (its own or a
|
||||
# concurrent reconciler's).
|
||||
_wake_clean_stale_tmp "$STATE_DIR"
|
||||
mkdir -p "$DET_DIR"
|
||||
|
||||
# Iterate the DECLARED source-coverage inventory (§4/G3): only sources listed
|
||||
|
||||
Reference in New Issue
Block a user