Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some minor hash index issues #3471

Merged
merged 2 commits into from
May 10, 2024
Merged

Fix some minor hash index issues #3471

merged 2 commits into from
May 10, 2024

Conversation

benjaminwinger
Copy link
Collaborator

@benjaminwinger benjaminwinger commented May 10, 2024

I've fixed a few places where unused data isn't being zeroed (which makes it harder to do binary comparisons of the files when debugging), and also fixed BaseDiskArray::getAlignedElementSize as its behaviour was incorrect when the size was not a power of two to begin with (I've added some asserts to enforce that the result of the function is sane).

This should not be a breaking change, as BaseDiskArray::getAlignedElementSize was only being used by the Hash index for the purpose of calculating the minimum number of slots and will not affect the size used when reading.

I noticed these issues when looking at kuzudb/explorer#129, but I don't think they will resolve the issue (both the expected and actual slots were larger than they should be for hash indexes containing only one value, both being in the range of 0-31, instead of 0-15 as I would expect).

@benjaminwinger benjaminwinger merged commit 7251ee6 into master May 10, 2024
18 checks passed
@benjaminwinger benjaminwinger deleted the hash-index-init branch May 10, 2024 18:58
ted-wq-x pushed a commit to ted-wq-x/kuzu that referenced this pull request Nov 14, 2024
* Fix uninitialized values in hash index

* Fix BaseDiskArray::getAlignedElementSize

(cherry picked from commit 7251ee6)
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