Answer every record, count what was not stored, and let a second writer wait #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/honest-when-busy"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The first of the review's cheap items, taken together because they are one fault: the client lied about itself when busy.
What changes. Every record is answered
stored,rejectedwith the reason, ordroppedwith the error. Collectors deliver through one helper that sends, reads the answer, reconnects once if needed, and returns whether the gate stored the record; eighteen hand-rolled send blocks became that call. Onlystoredcounts as emitted; the rest isevents_droppedon the heartbeat, and the store carries acollector_droppedcounter moved by the difference. A submit failure is a counter and an answer, not a line on stderr. A heartbeat answered with the wrong shape is treated as a lost connection. The store opens with a five-second busy timeout so the uploader's writes wait for the gate's transaction instead of failing with "database is locked".Proof. Delivery counts only what the gate stored; a wrong-shaped answer is not a delivery; a record is answered with what became of it; dropped counts reach the store once; a second writer waits instead of failing, and that test fails with the timeout removed. Linux verifier green on the pinned toolchain; the clock and Windows crates cross-check clean. Not run here: the end-to-end suite over real pipes, which now reads the acknowledgement after each record, and the Windows verifier.