fix(index): seal an edit's successor during text projection - #3075
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
An arrival during a publication's text projection waited for that projection to finish and its generation to seat before the worker reconciled it. The publishing pass now watches pending arrivals while it joins the projection, seals the successor when admission is free, and hands that outcome to the next pass instead of resealing from source. Fixes #2798 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
The early seal now claims the arrival it answers and the next pass reuses that arrival, so an edit after the seal stays pending for its own pass instead of being consumed by the presealed outcome. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This branch has not been deployed
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
Motivation
Fixes #2798. The publishing pass called
.awaitonpublished_text_projectiondirectly, so the worker could not act on a pending arrival until the projection finished and the seat completed.Changes
registry/mount.rs: the projection join now loops withtokio::select!on the projection andworker_wake.try_acquire_owned()onbackground_reconcile_admissionand never waits on it, because it holds the publication gate.reconcile_retained_text_generation_with, thenactivate_or_reconcile(graph-on) orreconcile_now(graph-off).Publishedoutcome is stashed insealed_successor. The next pass returns it instead of resealing from source, and the arrival stays pending for that pass.pause_next_opened_published_text_projection(registry.rs,test_gates.rs). It holds a publication's projection after its first advance opens the build, so the publishing pass stays in the join.edit_during_text_projection_seals_its_successor_before_the_projection_finishes(tests/reconcile.rs). It editssrc/lib.rswhile the projection is held and requires the durable pointer to move before the projection is released. It then checks that both generations project and that the served successor has the edited symbol.Test plan
bash scripts/require-exact-test.sh cargo test -p tracedecay-code-index-runtime --lib code_index_scheduler::tests::reconcile::edit_during_text_projection_seals_its_successor_before_the_projection_finishes -- --exactcargo test -p tracedecay-code-index-runtime --lib: 587 passed, 1 ignoredcargo clippy -p tracedecay-code-index-runtime --all-targets -- -D warningsis cleancargo fmt --all -- --check,python3 scripts/linux-test-partitions.py check,node scripts/lint-commit-range.mjs --repository . origin/master HEADpasscargo nextest run --workspace --no-fail-fast(not run locally; left to CI)Checklist
CHANGELOG.mdupdated (not updated; release-please generates it).envfiles includedLink to Devin session: https://app.devin.ai/sessions/4f29111e045a46a3a79417028ae66e8c
Open in Devin Desktop: https://app.devin.ai/desktop/session/4f29111e045a46a3a79417028ae66e8c?variant=devin
Requested by: @ScriptedAlchemy