summaryrefslogtreecommitdiff
path: root/src/fs.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 03:04:35 -0300
committerGabriel Schneider <[email protected]>2026-10-01 03:04:35 -0300
commit422ad65025edd994b04728632fc96de4ebda07f7 (patch)
treec07cb88dfe379ae7183bf1fd204724943fca3f5e /src/fs.zig
parentb7182d34e12130ced98dee7726b3bc87d4584ca9 (diff)
downloadpardes-422ad65025edd994b04728632fc96de4ebda07f7.tar.gz
pardes-422ad65025edd994b04728632fc96de4ebda07f7.zip
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 <[email protected]>
Diffstat (limited to 'src/fs.zig')
-rw-r--r--src/fs.zig3
1 files changed, 3 insertions, 0 deletions
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 },