Open spicymatt opened 9 months ago
hi, is there any progress on that task ? It seems that if you remove all vectors from the cluster, and then save the index, there is a crash. It is a side effect of this bug. Looks pretty important as an index with removed items is inconsistent
regards
This snippet looks interesting. I'll try to reproduce it in the C layer and debug there. Thanks for the patience 🤗
Describe the bug
The following code (Swift) adds 500 items to the index, and then removes them. The count of items in the index after removal is 448 (consistently ... when we expect 0) Search for items does not seem to return any of the original items, but the size of the index is inconsistent.
If we try to add the items back by reserving the expected space (500), it crashes when we add() because of insufficient capacity. If we reserve more space (448 + 500) and add the 500, it works, and the final count is 500, as expected.
It seems that after a removal, the index has some nodes that are not properly removed.
We tested the compact() method after removal and it does not help...still 448 items in the index
Steps to reproduce
Here is the code:
Expected behavior
I would expect the index.count to be 0 after a removal of everything.
USearch version
2.9
Operating System
macOS Sonoma
Hardware architecture
Arm
Which interface are you using?
Other bindings
Contact Details
Matthieu.kopp@gmail.com
Is there an existing issue for this?
Code of Conduct