From d105a3ca90441c645101a25236e43718406e58a5 Mon Sep 17 00:00:00 2001 From: Nils Lehnen <30603423+iderex@users.noreply.github.com> Date: Thu, 17 Sep 2026 20:51:56 +0200 Subject: [PATCH] Give the reason 0105's queue answers are unwritten that survives the queue Closes #412 The `What is not here` section of the cache envelope said nothing in this tree holds a queue, and gave that as the reason none of 0105's three answers for a queue entry is written there. `src/server/write_queue.rs` holds the queue and says so in its own words. The sentence was written on 2026-08-28 and the queue landed on 2026-08-30, in a change under `src/server/` that had no reason to open a section in the cache. The conclusion is unchanged and only the reason moves. What actually holds all three is that nothing puts a queue entry in an envelope at all: the queue lives in memory for as long as the value does, its durability is unbuilt and no drain runs, so there is no stored entry for one of these checks to refuse and no drain for one of them to continue past. That reason survives the arrival the old one did not. What was wrong: an absence used as a reason after the thing had arrived. How it was found: by reading this paragraph against the module it says does not exist, which opens by saying it holds the queue a drain would walk. Every changed line is a documentation comment. No type, constant, function, test or behaviour moves, none of 0105's three answers is written, and #47 is still where they belong. Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com> --- src/cache/envelope.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/cache/envelope.rs b/src/cache/envelope.rs index ed43e74..56131ed 100644 --- a/src/cache/envelope.rs +++ b/src/cache/envelope.rs @@ -43,8 +43,22 @@ //! three different answers: a drop is reported at `failure` rather than //! `notice`, a drain steps over a bad entry instead of stopping at it, and a //! counter that fails its own envelope is rebuilt rather than emptying the -//! queue. Nothing in this tree holds a queue, so none of the three is written -//! here, and #47 is where they belong. +//! queue. None of the three is written here, and #47 is where they belong. +//! +//! What holds all three is that nothing puts a queue entry in an envelope at +//! all. [`crate::server::write_queue`] keeps the queue in memory for as long as +//! the value lives and says of itself that its durability is unbuilt and that no +//! drain runs, so there is no stored queue entry for one of these checks to +//! refuse and no drain for one of them to continue past. +//! +//! THIS PARAGRAPH GAVE A DIFFERENT REASON: THAT NOTHING IN THIS TREE HOLDS A +//! QUEUE. That was the tree on 2026-08-28, when this section was written. The +//! queue arrived two days later, in a change under `src/server/` that had no +//! reason to open a `What is not here` section in the cache, and the module says +//! in its own words that it holds the queue a drain would walk. The conclusion +//! did not move and the reason did, which is why the reason is replaced with the +//! one that survives the queue arriving rather than corrected to a second one +//! that would not. #412 is where it was found. use core::sync::atomic::{AtomicU64, Ordering};