-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Windows cached stores can block watcher publication #1117
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.stability/performanceServer crashes, OOM, hangs, high CPU/memoryServer crashes, OOM, hangs, high CPU/memoryux/behaviorDisplay bugs, docs, adoption UXDisplay bugs, docs, adoption UXwindowsWindows-specific issuesWindows-specific issues
Milestone
Description
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.stability/performanceServer crashes, OOM, hangs, high CPU/memoryServer crashes, OOM, hangs, high CPU/memoryux/behaviorDisplay bugs, docs, adoption UXDisplay bugs, docs, adoption UXwindowsWindows-specific issuesWindows-specific issues
Problem
A background watcher reindex can run while the MCP server owns a cached SQLite read handle. The Windows SQLite VFS opens without
FILE_SHARE_DELETE, while the graph writer publishes withMoveFileExW. The cached handle can therefore block the atomic replacement before the post-success stale-store notification runs.This was found while implementing SVN auto-watch in #1113.
Evidence
src/main.c: the watcher invokes the server-less supervised index before callingcbm_mcp_server_mark_store_stale.vendored/sqlite3/sqlite3.c: Windows share mode is read/write only.internal/cbm/sqlite_writer.c: the writer documents that incompatible open handles make replacement fail.Suggested direction
Add an MCP-owned Windows pre-index quiescence handshake: finish any in-flight query, close the cached handle on its owning thread, block new graph requests until publication completes, then reopen on the next query. Keep POSIX generation handoff unchanged. Add a native Windows same-session test with a pre-warmed query store.