The draft v1.1 store format runs only in lab builds and in this package's
tests (chunkV11Format). The mutation hook passes the write's store
position, so the chunk record knows the position through which it has
applied every write.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sampling r1's epoch and then waiting for that exact epoch failed when a
further round moved it in between. waitRejoinConverged polls until r1 is a
healthy primary at some epoch e >= 2 and r2 and r3 are healthy peers at the
same e, read in one pass, and returns e.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the scratch-cut exemption holds only while the chunk keeps the version
the scratch cut captured; a stale capture grants nothing
- TestMain has no switch that turns the strict findings off
- the raced-fill test bounds every wait and always releases and joins
its reader
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After its 6 s pause the resumed primary can answer the promotion gate's
probe not ready on a loaded host; the gate then runs one more fencing round
and continues r1 at the next epoch. The test waited for healthy peers at
epoch 2 only and failed (run 46515001535: r2 and r3 healthy at 3). It now
waits for both replicas healthy at r1's current epoch (at least 2), checks
that r1 is still the primary and that no replica was promoted, and reads
blocks A and B back; a further round is logged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bitmap is pinned block by block (the file's local block, a single and a
batch log suffix, their non-local neighbours). The crash before the fence is
the injected one at the first slot write, with the pages complete, no
header and the presence file there at that point; a crash after the fence
and before the header completes on reopen; a retry over a complete record
writes no page, no header and no descriptor slot (file identity checked).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A store marked at this epoch is never seeded from the presence file: a
complete record only has the file removed, an incomplete one gets its pages
again from the store's bitmap through the boundary's same-epoch retry, with
a seed that refuses. A store marked at another epoch is refused, typed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two reds: a completed upgrade with a damaged header re-reads the presence
file; an upgrade at another epoch than the store's marker is taken.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After Recover, with extent draining held and before the chunk layer
attaches: seed the store's bitmap from the presence file (present chunks
whole; absent chunks with the file's local blocks and those of log entries
not yet applied), write the record's pages from the prepared coverage with
each chunk classified by the kernel's Rebuilt event, let the store publish
the bitmap and fence both slots, write the header, remove the presence file.
Each step repeats; a complete record only has the presence file removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The parent no longer claims, so its claim map stays empty and -count=2
passes; a hold helper keeps the claim until its stdin closes, a try helper
reports taken or refused, and both run under a local deadline and are
reaped. Held: refused to another process; after the holder exits: taken.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lock file created by one runner user (0644 under umask 022, never removed)
was opened read-write by the next user and refused with EACCES, locking its
port out for good. flock needs no write access: open read-only, create
0444. Only EWOULDBLOCK means another process holds the port; any other
claim error is reported once, with its path, and the port is left to the
listen probe.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two defects that #833 introduced, each shown by a test that fails at
f5926348:
- a format-2 bitmap baseline outlives a discarded WAL suffix
(Recover returns nil with bitmap position 1 while the retained
position is 0);
- the legacy FenceChunkStateUpgrade relabels an initialized format-2
bitmap epoch (7 -> 8).
The fixes exist but are not yet qualified on Linux. Main goes back to
its state before #833; the feature returns as one PR with the fixes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Heap per chunk after a cut, 262,144 chunks: stated 520 B in total and 56 B
for the shadow's share (measured 481 and 48).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>