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
🔧 [P2] Fix vector index consistency and error handling #139
Multiple issues in crates/uteke-core/src/memory/vector.rs:
1. Sidecar file consistency risk
UUID↔u64 key mapping stored in separate .keys file next to .usearch file. If either is corrupted or they get out of sync (crash between saves), data is lost. No atomic save (write-to-temp-then-rename), no checksum.
2. Sparse Vec growth
key_to_id uses Vec<String> as sparse mapping from u64 to UUID. After deletions, this Vec can hold many empty strings. With 100K inserts and 50K deletes → 100K entries, 50K empty.
3. Silent error swallowing
Failed usearch::Index::add() and remove() log errors but don't propagate. Caller thinks operation succeeded. VectorIndex::insert() returns () not Result.
4. \_ef parameter ignored
The ef (exploration factor) parameter in search() is accepted but ignored. HNSW search quality tuning is impossible.
5. Mutex blocks concurrent embedding
embed() takes &mut self unnecessarily — ONNX session is Send + Sync after init. Forces Mutex on all callers, serializing concurrent operations.
Proposed Fixes
Atomic save: write to temp file, then rename (POSIX atomic on same filesystem)
Replace Vec<String> with HashMap<u64, String> for sparse mapping
Activity
feat: v0.0.8 stability & architecture overhaul
feat: v0.0.8 — Stability & Architecture (#160)
fix(#139): vector index consistency — atomic save, error propagation
fix(#139): vector index consistency — atomic save, error propagation (#…
fix(edges): enforce namespace isolation on UUID/rel edges (#138)
feat: auto-wired memory edges (#346) (#375)
2 remaining items
release: v0.7.1 — develop → main (#633)
release: v0.7.1 — develop → main (#633) (#638)
release: v0.7.1 — develop → main (#633) (#639)
release: v0.7.2 — develop → main (#641)
feat: POST /doc/update endpoint — partial document update with chunk …
sync: develop → main (v0.7.3 release) (#651)
release: v0.7.3 — develop → main (proper sync) (#653)
feat: v0.0.8 — Stability & Architecture (#160)
fix(#139): vector index consistency — atomic save, error propagation (#…
feat: auto-wired memory edges (#346) (#375)
feat: POST /doc/update endpoint — partial document update with chunk …
sync: develop → main for v0.7.0 release (#619)
sync: develop → main — resolve 62-commit divergence for v0.7.1 release (
release: v0.7.1 — develop → main (#633) (#638)
release: v0.7.1 — develop → main (#633) (#639)