Skip to content

Make reconcile size fixes safe under concurrent retention#76

Merged
AnIrishDuck merged 1 commit into
mainfrom
fmurphy/concurrent-reconciliation
Jun 2, 2026
Merged

Make reconcile size fixes safe under concurrent retention#76
AnIrishDuck merged 1 commit into
mainfrom
fmurphy/concurrent-reconciliation

Conversation

@AnIrishDuck

Copy link
Copy Markdown
Collaborator

The UpdateManifestSizes fix used an UPSERT, so if retention removed a segment between reconciliation snapshotting the manifest and applying the fix, the fix would re-insert the just-deleted row. Reconcile already runs as a background task alongside the retention loop, so this race is latent today.

Add manifest.update_size_if_unchanged, a conditional UPDATE that only applies when the row still exists and still records the observed size, and route the fix path through it. Stale fixes now no-op instead of corrupting the manifest.

https://claude.ai/code/session_012DDngSC1pugnumJWGouv9R

The UpdateManifestSizes fix used an UPSERT, so if retention removed a
segment between reconciliation snapshotting the manifest and applying the
fix, the fix would re-insert the just-deleted row. Reconcile already runs
as a background task alongside the retention loop, so this race is latent
today.

Add manifest.update_size_if_unchanged, a conditional UPDATE that only
applies when the row still exists and still records the observed size, and
route the fix path through it. Stale fixes now no-op instead of corrupting
the manifest.

https://claude.ai/code/session_012DDngSC1pugnumJWGouv9R
@AnIrishDuck AnIrishDuck requested review from JONBRWN and imp May 29, 2026 15:42
@AnIrishDuck AnIrishDuck merged commit c1b7115 into main Jun 2, 2026
3 of 4 checks passed
@AnIrishDuck AnIrishDuck deleted the fmurphy/concurrent-reconciliation branch June 2, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants