aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-15 18:49:12 +0000
committertv <tv@krebsco.de>2026-11-15 18:49:12 +0000
commitc8f7165bae7344c0fb0d5265b7736de8ed26d91c (patch)
tree968214fbd2c731fb466c9bbc2bdb41e04ef1d53c
parent036b968712c6c4d5e467de3d1df17ffa538a23c5 (diff)
remakes: a signed place already held is kept like any write that loses
Where the new epoch holds as high a `seq` at a signed place as the old one reads, the chain isn't replayed: it was counted as superseded and left out even with `--superseded-writes quarantine`, unlike every other write a newer one superseded. Now it goes to the quarantine then too.
-rw-r--r--docs/remakes.md21
-rw-r--r--src/remake/delta.rs10
2 files changed, 20 insertions, 11 deletions
diff --git a/docs/remakes.md b/docs/remakes.md
index e33955ea0..1cb14d1 100644
--- a/docs/remakes.md
+++ b/docs/remakes.md
@@ -317,10 +317,10 @@ The swarm stays writable throughout.
clocks gave their changes. A carried-over write keeps the time it was made, so a
later carry-over judges by that, and the user it was made for (`GET /admin/changes`);
the carrying node commits it. Another member's own entry (its alive stamp, its
- links) is carried over by that member only. A write that loses is left out, logged (`Writes not
- replayed: newer ones touched their paths`), or with `--superseded-writes quarantine`
- kept in the quarantine. Clocks that disagree (beyond `--clock-skew-warn`) can make
- the older write win.
+ links) is carried over by that member only. A write that loses is left out, logged
+ (`Writes not replayed: newer ones touched their paths`), or with
+ `--superseded-writes quarantine` kept in the quarantine. Clocks that disagree (beyond
+ `--clock-skew-warn`) can make the older write win.
* **Under a policy** ([`access.md`](access.md)), a carried-over write is judged as every
node will judge it, in the new epoch: one they would refuse (its user may no longer
write there, say) goes to the quarantine instead, so it can't cut the carrying node
@@ -329,12 +329,13 @@ The swarm stays writable throughout.
chain of envelopes that leads to the one the old epoch reads: each one after what the
new epoch holds there, in order, each in a change of its own by its signer, at the
time it was made, so that each replaces the one before as every node checks. Not by
- clocks: a place is carried over only where the new epoch holds a lower `seq` there,
- and the links of all places in the order their changes were made, each after those it
- builds on (one may add the key the next is signed with); clocks decide only between
- changes neither of which saw the other. Where no chain leads from what it holds, the
- place goes to the quarantine; where a link is refused, the place keeps the last one
- taken, and the rest goes to the quarantine.
+ clocks: a place is carried over only where the new epoch holds a lower `seq` there
+ (otherwise as a write that loses), and the links of all places in the order their
+ changes were made, each after those it builds on (one may add the key the next is
+ signed with); clocks decide only between changes neither of which saw the other.
+ Where no chain leads from what it holds, the place goes to the quarantine; where a
+ link is refused, the place keeps the last one taken, and the rest goes to the
+ quarantine.
* **Granularity**: map entries are carried over per key. Lists and text are carried
over whole, so concurrent edits of the same list on two nodes around a remake end as
last-writer-wins.
diff --git a/src/remake/delta.rs b/src/remake/delta.rs
index 388eae7..0d87564 100644
--- a/src/remake/delta.rs
+++ b/src/remake/delta.rs
@@ -158,7 +158,15 @@ pub(crate) fn replay_newest(
ordered.insert((made, ordered.len()), (when, place.clone(), envelope, user));
}
}
- Chain::Held => stats.superseded += 1,
+ Chain::Held => {
+ stats.superseded += 1;
+ if superseded == Superseded::Quarantine {
+ stats.quarantined.push((
+ place,
+ "the new epoch holds as high a `seq` there".to_owned(),
+ ));
+ }
+ }
Chain::Broken(why) => stats.quarantined.push((place, why)),
}
}