Repository navigation
Conversation
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.
Description
LlamaIndex rebuilds currently write the full vector index and BM25 sidecar after every source document. Save a checkpoint after the first source, then after 16 more sources or once 30 seconds have elapsed, whichever comes first at a source boundary. Flush the remaining batch before publishing and mark its sources complete only after the checkpoint has been committed.
Related Issues
Related to #2721, specifically section E on full-index writes during large knowledge-base rebuilds.
Windows validation
Both runs used the same 96 source documents and produced 576 indexed nodes. The embedding provider was replaced with a deterministic local mock. Vector indexing, BM25 construction, snapshot writes, and the flush calls ran on Windows.
The seven checkpoints covered 1, 17, 33, 49, 65, 81, and 96 completed sources.
I also forced the process to exit after it processed source 20, with 17 sources committed. A fresh process reused all 17 checkpointed sources and embedded the remaining 79, including the three that had been processed without a committed checkpoint. With a previously published index present, that index was still readable after the interruption. The resumed rebuild then published a new index containing all 96 sources and 576 nodes.
Modules affected
servicestestsChecklist
dev.git diff --checkpassed.pre-commit run --all-fileswas not run.