unum-cloud / usearch

Fast Open-Source Search & Clustering engine × for Vectors & 🔜 Strings × in C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, GoLang, and Wolfram 🔍
https://unum-cloud.github.io/usearch/
Apache License 2.0
2.27k stars 143 forks source link

Fix: Fix crash when trying to remove with read-only index #506

Closed abetomo closed 1 month ago

abetomo commented 1 month ago

The index read by view() is read-only. When I did a remove() on that index, it crashed. (Segmentation fault (core dumped))

Although it is an invalid operation to do a remove() on a view() index, it is not a better way to crash, so we have fixed it to return an error.

abetomo commented 1 month ago

Thanks for the review. I fixed the test as it was failing. #509