-
Notifications
You must be signed in to change notification settings - Fork 504
Open
Description
Problem
Check for existing indexing and setting indexing state is not atomic.
Current Behavior
// handlers.ts:192-200
if (this.snapshotManager.getIndexingCodebases().includes(absolutePath)) {
return { /* already indexing */ };
}
// ... validation code ...
this.snapshotManager.setCodebaseIndexing(absolutePath, 0);Gap between check and set allows race condition.
Impact
Two concurrent index requests for same path may both pass the check and start parallel indexing jobs.
Expected Behavior
Atomic check-and-set, or use mutex/lock for indexing operations.
Location
packages/mcp/src/handlers.ts:192-282
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels