Repository navigation
Conversation
msokh
marked this pull request as ready for review
October 9, 2026 10:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prevent route rollback from leaving merge tasks that write into an already-published lexical generation.
Tantivy 0.26.1 replaces its updater during
IndexWriter::rollback(). The old updater's merges can keep writing. Waiting on the replacement writer does not wait for those tasks, and killed updaters reject merge completion before metadata registration and GC.Change
The production merge thresholds, history format, source ownership, and semantic behavior are unchanged.
Reproduction
A real filesystem/Tantivy fixture with 600 committed records reproduced the failure in four runs. After rollback and the replacement writer's wait returned, the old merge wrote six unreferenced segment files and changed
.managed.json. The merged segment never enteredmeta.json; all committed records stayed searchable. The original-writer wait control passed in all four runs.The dependency reproduction uses an explicit merge to obtain a completion edge. The ctx regression observes real automatic merge dispatch from actual route checkpoints; it does not simulate pointer activation or claim to identify the historical failed source route.
Verification
The new ctx route/cohort regressions failed on the base at real rollbackable merge dispatch. The explicit merge-disabled control passed. After the fix, route rollback, cohort rollback, merge-disabled publication, source revalidation abort and failed Merging progress tests passed. Terminal publication still coalesces eligible segments and discards failed-route records.
A separate epoch-isolation regression protects abandoned updater controls.
ctx-history-index --libbefore the test-support simplification: 244 passed, 1 ignored, 0 failed. The final-head repeat was interrupted when the Docker daemon disconnected (unexpected EOF); it is not a full-suite PASS for the final HEAD.ctx-history-index-query --all-targetsbefore the test-support simplification: 9 unit and 142 integration tests passed. The final-head integration repeat timed out after 900 seconds in the existing 512-segment topology fixture; tests preceding that fixture passed, but the repeat is not a full-suite PASS.cargo fmt --all -- --checkpassed.ctx-history-index --lib: 232 passed, 1 ignored, 2 explicitly filtered baseline failures named below; 0 failures in the remaining suite.The macOS writer suite reported two existing APFS-clone assumptions (
incremental_append_needs_controls_and_writer_scratch_not_a_second_baseandcandidate_merge_unlinks_preserve_published_certifications). Both also fail on the unchanged base; both pass on Linux. This PR does not change those tests or the cloning implementation.No live
~/.ctxdata was rebuilt or changed, and no installed binary was replaced.