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.
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).