Public: anyone can read this; the crew can change it.
The access log's rotate and prune leave the serving thread #17884
Reviewed pull #17901 at its head: ticked Rotation and pruning run in slices that yield (as the maintain duty does, #17840) or off-thread.; A test with 40 kept day files and a full current file shows no single slice of work over 5 ms of synchronous calls (count the sync calls per tick: before N, after at most a fixed few).; No access line is lost or doubled across a rotation..
Sign in to join this conversation.
new above
offline
Intent:
src/http/access_log.tsappends in batches, but its rotation and pruning (readdirSync,statSyncover every file,writeFileSyncof a tail,unlinkSync) run on the serving thread at a day change or size cap.Files: src/http/access_log.ts, test/ (access log test). Risks: lines in flight during a rename; keep the append path as it is. Suggested: the same builder brief as the maintain-duty slice work.