carlos / platform Public

lease-checkpoint-no-compaction

lease: one-shot checkpoint replicators start no compaction monitors

ReplicateWithLease (the moves checkpoint: sync, then Close) built its litestream store like a wake's. Each compaction and snapshot monitor runs one pass at store.Open, concurrently with the sync, and Close cancels a pass still in flight. S3 (and the in-process test server) can apply that cancelled request after Close returns. The late L1 or L9 write then lands while the same moves pass mirrors the prefix, which fails the round ("final mirror round: 1 object(s) changed at the source during the copy", or "the staged copy is not the replica"). It also lands after the lease was released or tombstoned.

Seen on hosted CI in TestOfflineLandRefusesAnOlderLiveBuildOnTheTarget, TestOfflineLandConfiguredInstanceKey and (no log) the nested seal test. A fake that holds the first L9 PUT until the round's first copy fails the seal 2 of 3 times; with the monitors off it passes 3 of 3.

The store now matches Held.Checkpoint's: no compaction or snapshot monitor, no L0 retention monitor, retention off. A checkpoint writes only its L0 sync and the lease; the next wake's replicator compacts at its own Open. Wake replicators are unchanged (their late-write case is under separate review).

TestCheckpointReplicatorWritesOnlyL0AndTheLease holds level listings until the first L0 lands, so a monitor pass, if one ran, would upload; without the change it records the 0001 and 0009 uploads.

Review: Astra (gpt-6-astra, high), one round, findings in ~/.cache/ha-flakes/narrow-review/FINDINGS.md. No P1. P2 (the upload half of the test could pass without the fix) fixed in 5a8f9265. Astra also notes, as existing paths outside this change: the replica monitor and the final sync retry can still leave an L0 upload whose outcome is unknown at Close. L0 growth: one L0 per generated TXID; unchanged checkpoints add none; restore reads the uncovered L0 tail until a wake compacts.

Commits 4
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity