Repository navigation
Conversation
Plugins that keep records beside the index can write them in the index transaction and publish them after the commit. Every implementation runs in registration order; an apply failure rolls the write back, and a publish failure reaches the caller with the commit kept.
Member
|
Thanks Jon, this is close to exactly what we discussed: every implementation through
Two small ones while you're there:
Happy to look again as soon as you push. |
Pass the traversal set and actual prune results to plugins, distinguish checkpoints, and keep incremental degradation messages. Apply again after checkpointed init analysis and include the health re-score writer. Exercise server rollback and final init analysis against the real store.
Contributor
Author
|
Thanks for the review - made changes per your input:
I also merged main to resolve a conflict with #4393. Separately, re-running init keeps |
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
index-persistenceseam from Add an index transaction seam for plugin-owned records and publication #4721. Every registered implementation runs, in registration order.applyruns inside the index write's transaction, so a raise rolls back the index rows and every earlier plugin's records.publishruns after the commit and the writer's own cleanup; its error reaches the caller and the commit stays.apply_index_persistencewhere index rows are written (persist_pipeline_result, the resume checkpoint, init's final write after analysis, the step shared by incremental and docs-mode updates, and the health re-score), andpublish_index_persistenceas the last statement of each writer (init,index_repo_full, incremental and docs-mode updates, the health re-score, server index jobs). There's no default implementation, and with no plugin registered the writers behave as before.Related Issues
Closes #4721.
Test Plan
The tests run init,
index_repo_full, incremental and docs-mode updates and the health re-score on SQLite with two registered plugins, each for success, anapplyfailure and apublishfailure. Separate tests cover the init checkpoint, init's final write after a successful checkpoint, and a server job against the real store with anapplyor apublishfailure. Each case fails with its writer's call removed.pytest tests/unit tests/providers): 40,053 passed.ruff checkon the changed files).npm run build) (no frontend changes)Checklist