aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/046-commit-replica/prefixes.py
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-19 14:16:33 +0100
committereunhhu <[email protected]>2026-10-19 14:16:33 +0100
commitd5107e9e61d1083f945edb64ec619c333024a43f (patch)
tree5f8444aced1da3c0151b151f89e13ef89a8769d4 /research/experiments/046-commit-replica/prefixes.py
parent109c3afd29b6cad3e529d83fde8aeb1d0da700ff (diff)
downloadpure-d5107e9e61d1083f945edb64ec619c333024a43f.tar.gz
pure-d5107e9e61d1083f945edb64ec619c333024a43f.zip
046, 029: the taken-over store sent a message too (opened() works on a copy: show, add, show; 20 more kill -9s: all open and take it as owners; 667 prefixes again with it: all pass); the price measured again without the fold that inflated it (entries.aup's summed view folded every entry each message): 48.5 to 232 us a message on tmpfs, 146 us of the 183 waiting for acks; the shim never stopped across the runs
Diffstat (limited to 'research/experiments/046-commit-replica/prefixes.py')
-rw-r--r--research/experiments/046-commit-replica/prefixes.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/research/experiments/046-commit-replica/prefixes.py b/research/experiments/046-commit-replica/prefixes.py
index ab228aa..5d56c7b 100644
--- a/research/experiments/046-commit-replica/prefixes.py
+++ b/research/experiments/046-commit-replica/prefixes.py
@@ -3,7 +3,8 @@
part of a cut: a cut's records travel together). The owner takes EVENTS messages with the shim keeping every op it
shipped (SHIM_JOURNAL); then the ops are done again in order into a fresh directory, and at SAMPLES points (op
boundaries drawn at random, within cuts and at their ends, and the whole stream) a copy of what is there is opened by
-pure-run as the owner (and around every rename: a compaction's or an image's install). Each must open without a fault, hold the first `total` messages' entries exactly (summed), hold
+pure-run as the owner (and around every rename: a compaction's or an image's install). Each must open without a fault, take
+a message as an owner does, hold the first `total` messages' entries exactly (summed), hold
no fewer than at the sample before (a prefix never loses what a shorter one held), and the whole stream every message.
prefixes.py EVENTS SAMPLES one JSON line a sample, then one of the totals"""
@@ -98,7 +99,8 @@ def main():
shutil.copytree(root, copy)
took = harness.opened(copy)
total = int(took.get('total', -1)) if took.get('opened') else -1
- good = (took.get('opened') and took.get('fault') == 'none' and took.get('summed') == harness.summed(total) and
+ good = (took.get('opened') and took.get('fault') == 'none' and took.get('takes_a_message') and
+ took.get('summed') == harness.summed(total) and
total >= last_total and (pick < len(ops) or total == events))
if not good:
failures.append({'ops': pick, 'cut': ops[pick - 1][3], 'within_cut': mid, 'took': took, 'before': last_total})