Skip to content

Fix: Reject rename and batch remove on a viewed index - #838

Closed
FunHenaXTV wants to merge 1 commit into
unum-cloud:main-devfrom
FunHenaXTV:fix-rename-in-view
Closed

FunHenaXTV wants to merge 1 commit into
unum-cloud:main-devfrom
FunHenaXTV:fix-rename-in-view

Conversation

@FunHenaXTV

Copy link
Copy Markdown

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 #835

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
FunHenaXTV marked this pull request as ready for review November 4, 2026 18:41
@ashvardanian

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants