You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, have a great weekend! at 1590 lines of code
the ds.bplus.bptreehandleLeafNodeRedistributionOrMerging.BPlusTree#handleLeafNodeRedistributionOrMerging method,I don't quite understand this condition,
code:
intsnum = canRedistribute(splitNode);
if (snum > 0) {
codeofredistributingnextnodewithelementsfromsplit
}
method canRedistribute is to determine whether a node will still be greater than or equal to M / 2-1 after removing a Key. However, the condition for entering the current method is that the number of keys of the node must be less than or equal to M / 2-1,So I don't think this greater than 0 condition is going to hold, What do you think?I am looking forward to your reply! (^_^)
Because my English is not very good,So the above English is translated by me using software,please forgive me if I have incorrect grammar or offended you! 😀
The text was updated successfully, but these errors were encountered:
Hi, not sure I follow... canRedistribute returns a count not a boolean, so this will hold in some instances and as required. If you want to find one such instance during execution either put a breakpoint in your IDE at that branch and observe during execution or uncomment the stdout prints there are in the code.
I do not have time to provide detailed implementation details, so you'll have to figure those out yourself. Unless of course there is a bug... if so, feel free to re-open the issue.
Hello, have a great weekend! at 1590 lines of code
the ds.bplus.bptreehandleLeafNodeRedistributionOrMerging.BPlusTree#handleLeafNodeRedistributionOrMerging method,I don't quite understand this condition,
code:
method canRedistribute is to determine whether a node will still be greater than or equal to M / 2-1 after removing a Key. However, the condition for entering the current method is that the number of keys of the node must be less than or equal to M / 2-1,So I don't think this greater than 0 condition is going to hold, What do you think?I am looking forward to your reply! (^_^)
Because my English is not very good,So the above English is translated by me using software,please forgive me if I have incorrect grammar or offended you! 😀
The text was updated successfully, but these errors were encountered: