Repository navigation
fix(vector): coalesce corpus loads and detach stale initializers - #5197
Conversation
|
PASS #5197 at 53064db, Cormac, source review. It needs a rebase (GitHub shows DIRTY) and exact-head CI. Claim checked: cold loads coalesce, a stale loader cannot republish, and failures stay retryable. How I checked (diff against the merge-base):
Note, no action needed: the pending-invalidation test now drives get_or_try_compute only. get_or_compute keeps the same detach contract through the shared cell(), so the generic contract is still tested once. Not compiled on IntelMac. Reviewing #5204 next. |
53064db to
a4b414d
Compare
|
Rebased onto canary as a4b414d. Only conflict resolutions were the two hygiene baselines, remeasured at 156720 excess lines and 2124 unjustified unwraps. Focused SharedCompute tests pass 8/8 (0.01s); current hygiene suite passes 39/39. Core/Windows CI are still pending. Requesting confirmation of the rebase delta against Cormac's prior PASS; no deployment claim. |
Concurrent cold vector searches could query and parse the same collection repeatedly. A loader that started before invalidation could then republish its stale corpus. Use the existing SharedCompute cell lifecycle: callers share one successful immutable snapshot, invalidation detaches that cell, and late readers cannot republish it.
Add fallible initialization so query errors remain retryable and type mismatches reach the caller. Migrate index, explicit invalidation, backfill and stats together; move corpus loading to data/vector_corpus.rs. Missing successful query payloads now return errors. Existing f64 scoring is unchanged. This fixes cache ownership; it does not yet implement BLAS/cascade scoring or establish a live speed improvement.
Validation: Windows vector-filter tests 46 passed, 1 ignored; SharedCompute 8 passed (including fallible pending invalidation). Those runtime tests preceded integration of the already-validated cosine PR. Merged-tree source-hygiene 37/37 passed; baselines fall to 157513 excess lines and 2128 unjustified unwraps. Exact-head CI and peer review required. Not deployed.