From 422ad65025edd994b04728632fc96de4ebda07f7 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 03:04:35 -0300 Subject: A log follower hears every record queued before a Restore: the read it holds takes all that fit, before the hangup cuts it A follower reads one record per read, and a Restore hangs every client up, so records queued just before it -- the ones a script most wants, what led up to the Restore -- were lost: the read after the first was cut. Before the cut, each held read of /log is answered with every whole record queued that fits it. Co-Authored-By: Claude Opus 5.5 --- src/fs.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/fs.zig') diff --git a/src/fs.zig b/src/fs.zig index 91edd429..965eb47c 100644 --- a/src/fs.zig +++ b/src/fs.zig @@ -1506,6 +1506,9 @@ pub const Namespace = struct { /// Something a held read may be waiting on changed since they were last /// answered: a record queued, a run answered, a pane gone. news: bool = false, + /// A Restore is about to hang every client up: a follower's held read + /// of /log takes every queued record that fits, not one (events.readLog). + hanging_up: bool = false, /// The editor-wide event ring: panes made, renamed, saved and closed, and /// what the editor said. Recorded whether or not anyone reads /log. log: tree.events.Queue = .{ .cap = limits.log_bytes }, -- cgit v1.3