You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
storage: a second in-process LMDB handle can lose search postings during a rebuild #1111
Two LmdbBackend handles over the same path share one heed Env (the OPENED_ENV cache), so a second handle is reachable. LmdbBackend::open takes the per-path rebuild lock, but writers do not. A write committed by a second handle after the rebuild's read snapshot and before its clear has its postings swept by the clear, and the rebuild then writes the marker, so later opens skip rebuilding and the index is missing those postings — silently, because the body verdict masks a missing key only as a missed match.
Found by the round-2 code lens of job 028 ([INFERENCE], no repro yet). ADR 0012 D9 records the contract — one handle per store per process, and a rebuild must not overlap writes — and names what closing it properly means: the rebuild taking the write path's own lock, or indexing from a snapshot later writers cannot invalidate.
What decides it: a failing test first — open a store, start a stale-marker rebuild, commit a write through a second handle inside that window, then assert the postings for the new event exist and the marker is honest. Today that test should fail.
Not reachable in any shipped shape: nothing in production constructs LmdbBackend yet.
Activity