Ran into an issue when attempting to load from disk that the capacity (nodes_capacity_) is incorrect and is instead set to the number of slots already storing non-null nodes (nodes_count_). Digging into it further it seems that in save_to_stream(...) the header (index_serialized_header_t) created does not contain nodes_capacity_.
Wasn't too sure if this was intentional and thus wanted to raise an issue.
Steps to reproduce
Instantiate with a set number for capacity via reserve()
Save via save_to_stream
Load via load_from_stream
Check capacity and notice that it is different than the normal reserve() value
Expected behavior
Expecting the capacity after load to be the same value as when saved.
USearch version
v2.12.0
Operating System
macOS 14.5
Hardware architecture
x86
Which interface are you using?
Other bindings
Contact Details
No response
Are you open to being tagged as a contributor?
[X] I am open to being mentioned in the project .git history as a contributor
Is there an existing issue for this?
[X] I have searched the existing issues
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Describe the bug
Ran into an issue when attempting to load from disk that the
capacity
(nodes_capacity_
) is incorrect and is instead set to the number of slots already storing non-null nodes (nodes_count_
). Digging into it further it seems that insave_to_stream(...)
the header (index_serialized_header_t
) created does not containnodes_capacity_
.Wasn't too sure if this was intentional and thus wanted to raise an issue.
Steps to reproduce
reserve()
save_to_stream
load_from_stream
reserve()
valueExpected behavior
Expecting the capacity after load to be the same value as when saved.
USearch version
v2.12.0
Operating System
macOS 14.5
Hardware architecture
x86
Which interface are you using?
Other bindings
Contact Details
No response
Are you open to being tagged as a contributor?
.git
history as a contributorIs there an existing issue for this?
Code of Conduct