Repository navigation
fix(#139): vector index consistency — atomic save, error propagation - #263
Conversation
|
Warning Review limit reached
More reviews will be available in 17 minutes and 32 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-cli · BYOK · MIT |
- Atomic write for .keys sidecar file (temp + rename) - insert() now returns Result instead of silently logging errors - remove() already returned bool — no change needed - build() now returns Result — callers must handle errors - All callers updated: operations, maintenance, import_export, lib - ef parameter: usearch v2.25.3 Rust bindings don't expose ef in search() — cannot wire without forking. Added TODO comment. - embed(&mut self): ONNX tokenizer requires &mut — documented as architectural limitation in issue. Fixes: #139
3d6d816 to
b6c453d
Compare
…263) * fix(#139): vector index consistency — atomic save, error propagation - Atomic write for .keys sidecar file (temp + rename) - insert() now returns Result instead of silently logging errors - remove() already returned bool — no change needed - build() now returns Result — callers must handle errors - All callers updated: operations, maintenance, import_export, lib - ef parameter: usearch v2.25.3 Rust bindings don't expose ef in search() — cannot wire without forking. Added TODO comment. - embed(&mut self): ONNX tokenizer requires &mut — documented as architectural limitation in issue. Fixes: #139 * style: cargo fmt
Problem (#139)
Multiple issues in vector index:
.keysfile written non-atomically, corruption risk on crashinsert()andbuild()returned(), errors logged but not propagated_efaccepted but not wired to usearchFixes
.keysfile written via temp + rename (POSIX atomic)insert()returnsResult<(), Error>,build()returnsResult<(), Error>search(). Cannot wire without forking usearch. Left as_efwith TODO.&mut selfinternally. Architectural limitation. Kept as-is.What was already fixed (by previous PRs)
Verification
cargo clippy --all-targets -- -D warnings— cleancargo test— 107/107 passFixes: #139