aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/046-commit-replica
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-19 14:44:13 +0100
committereunhhu <[email protected]>2026-10-19 14:44:13 +0100
commita93891ee72bb1793eb1845d6d49369cb9f1e8806 (patch)
tree01504ed5b72a7efbf9be15707fbbacd9c103e22c /research/experiments/046-commit-replica
parent519df326fe131c94a706c0d8b8f23ca8f093af3b (diff)
downloadpure-a93891ee72bb1793eb1845d6d49369cb9f1e8806.tar.gz
pure-a93891ee72bb1793eb1845d6d49369cb9f1e8806.zip
047: "the leaf is the commit" (feedback 009) set up before it runs: today's store measured as the base (baseline.py, 046's shim and journal: list bytes a message, the log and images, at 1 / 16 / 256 messages a commit: entries' appends 65.5 / 15.7 / 12.4, the bank's transfers 122 / 35.6 / 30.1, the tree apart), and a byte-accounting model (model.py) of commits writing the leaves they changed in memory's own bytes (leaf 296 to 1,320 B, inner node 680 B, cow; tail appends in place past every kept snapshot's count; inplace, which may not be, to show why), its bars written before the run (appends at most today's, sparse updates at most twice, no write a kept snapshot sees) and what a pass for appends with a miss for updates would mean (two units, not one); 046's Run takes pure-run's arguments; 045's keyed file says 24 refused, not the 26 its commit said
Diffstat (limited to 'research/experiments/046-commit-replica')
-rw-r--r--research/experiments/046-commit-replica/run.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/research/experiments/046-commit-replica/run.py b/research/experiments/046-commit-replica/run.py
index e31ff50..38c24f1 100644
--- a/research/experiments/046-commit-replica/run.py
+++ b/research/experiments/046-commit-replica/run.py
@@ -86,7 +86,7 @@ def stores_differ(a, b):
class Run:
"""A follower, a shipper and an owner, started in that order on fresh stores."""
- def __init__(self, keys, every=0, shim=True, module='entries'):
+ def __init__(self, keys, every=0, shim=True, module='entries', extra=()):
self.owner_dir, self.follower_dir = WORK / 'owner-store', WORK / 'follower-store'
for d in (self.owner_dir, self.follower_dir):
shutil.rmtree(d, ignore_errors=True)
@@ -112,7 +112,7 @@ class Run:
self.paused = os.open(WORK / 'paused', os.O_RDWR) # held open both ways: no open waits for the other end
self.resume = os.open(WORK / 'resume', os.O_RDWR)
env.update(SHIM_PAUSE_EVERY=str(every), SHIM_PAUSE_DIR=str(WORK))
- self.owner = subprocess.Popen([str(RUN), str(WORK / f'{module}.pmod'), '--views', '--store', str(self.owner_dir)],
+ self.owner = subprocess.Popen([str(RUN), str(WORK / f'{module}.pmod'), '--views', '--store', str(self.owner_dir), *extra],
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True,
env=env, bufsize=1)
self.done = 0 # messages the owner said done (each line comes after its save, so after the follower's ack)