-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
bug: misues of INTERNAL_PAGE_SIZE in BPlusTreeInternalPage #562
Comments
This comment was marked as spam.
This comment was marked as spam.
I add |
Actually 254 should be the correct max size, because we need to align MappingType. The computation is wrong, but accidentally gets the correct result. |
When the |
Yes, that’s something we should fix. |
The definition of INTERNAL_PAGE_SIZE in BPlusTreeInternalPage is correct, but passing INTERNAL_PAGE_SIZE directly in b_plus_tree.h is incorrect because ValueType in BPlusTree is not the same as the ValueType corresponding to BPlusTreeInternalPage. Therefore, the macro definition of INTERNAL_PAGE_SIZE here leads to incorrect calculation results, which can cause wasted space in internal nodes.
The macro definition of INTERNAL_PAGE_SIZE in b_plus_internal_tree.h.
INTERNAL_PAGE_SIZE is used in b_plus_tree.h
Since the ValueType of MappingType in b_plus_tree.h is RID, which is incorrect for InternalPage, the INTERNAL_PAGE_SIZE will be miscalculated.
The text was updated successfully, but these errors were encountered: