fix: snapshot merge and indexing stuck issues (#276)#282
Merged
zc277584121 merged 2 commits intozilliztech:masterfrom Mar 11, 2026
Merged
Conversation
…lliztech#276) Signed-off-by: Cheney Zhang <chen.zhang@zilliz.com>
…rrupted indexing on startup When a codebase gets stuck in "indexing" state (e.g., due to process crash or restart), force reindex was blocked by the "already being indexed" check. This fix: 1. handlers.ts: Let force=true bypass the indexing check and clear stale state via removeCodebaseCompletely(), instead of being blocked indefinitely. 2. snapshot.ts: On MCP server startup, reset any interrupted "indexing" entries to "indexfailed" status, preserving the last attempted percentage for diagnostics. Signed-off-by: Cheney Zhang <chen.zhang@zilliz.com>
This was referenced Mar 11, 2026
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
Snapshot cross-process overwrite fix (snapshot file gets overwritten #276): Multiple MCP server processes sharing
~/.context/mcp-codebase-snapshot.jsonwould overwrite each other's entries. ChangedsaveCodebaseSnapshot()to use read-merge-write with mkdir-based file locking, ensuring concurrent processes preserve each other's data.Indexing stuck fix: When a codebase gets stuck in "indexing" state (e.g., due to process crash),
force=truere-index was blocked by the "already being indexed" check. Two changes:handlers.ts: Allowforce=trueto bypass the indexing check and clear stale state viaremoveCodebaseCompletely()snapshot.ts: On MCP server startup, reset any interrupted "indexing" entries to "indexfailed" status, preserving the last attempted percentage for diagnosticsTest plan
pnpm build:mcp)