Skip to content

fix: refresh resident datasets before compaction planning - #431

Merged
beinan merged 2 commits into
mainfrom
codex/refresh-before-compaction
Oct 21, 2026
Merged

beinan merged 2 commits into
mainfrom
codex/refresh-before-compaction

Conversation

@beinan

@beinan beinan commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

A resident compactor can hold a base-table version from before another executor's completed rewrite. Its next compaction then rewrites obsolete fragments and fails with RetryableCommitConflict, even when the two requests run sequentially. This reproduced with two current release-image workers against isolated Azure storage.

Refresh the writable dataset before direct or incremental compaction. Prepared compaction reads a fresh clone and records that clone's version/schema; publishing still validates the original prepared source fragments and requires the existing commit authority. Historical checkouts remain read-only. No automatic retry or table lock is added.

Validation: before the fix, both new regressions fail on main: direct compaction reports a stale Rewrite conflict, and prepared compaction captures version 8 instead of current version 12. The tests cover direct/incremental/prepared paths, a later append, exact row/blob preservation, and rejecting pinned historical handles. All 9 compact-related core tests passed, including concurrent WAL merge, incremental compaction, revoked authority, and rejecting deleted source fragments. Final head 8a69d9c passed all 11 CI checks across the Rust, Python and Style workflows, including real-etcd HA tests, coverage and all three platform wheels. Targeted local Clippy also passed. No production configuration or release-image pin changes.

@beinan
beinan marked this pull request as ready for review October 21, 2026 09:41
@beinan
beinan merged commit 7f93024 into main Oct 21, 2026
11 checks passed
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.

1 participant