Repository navigation
Fix: Reject rename and batch remove on a viewed index - #838
Closed
FunHenaXTV wants to merge 1 commit into
Closed
FunHenaXTV wants to merge 1 commit into
FunHenaXTV wants to merge 1 commit into
Conversation
A viewed index is a read-only memory map. `add` and the single-key `remove` already refuse to change it, but `rename` and the batch `remove(begin, end)` wrote the new keys straight into the mapping and crashed with SIGBUS. This reached C `usearch_rename` and Python `Index.rename` and `Index.remove([...])`. Both now fail with "immutable index" errors like the single-key `remove`. A self-rename still returns early, so it keeps working on a view. Closes unum-cloud#835
FunHenaXTV
marked this pull request as ready for review
November 4, 2026 18:41
This was referenced Nov 14, 2026
Member
|
@FunHenaXTV, closing this together with #835: the 2.x rename and removal paths it guards are gone, and #846 tracks how 3.0 brings removal back, with views refusing it outright. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A viewed index is a read-only memory map.
addand the single-keyremovealready refuse to change it, butrenameand the batchremove(begin, end)wrote the new keys straight into the mapping and crashed with SIGBUS. This reached Cusearch_renameand PythonIndex.renameandIndex.remove([...]).Both now fail with "immutable index" errors like the single-key
remove. A self-rename still returns early, so it keeps working on a view.Closes #835