Closed CJLUzjj closed 2 years ago
不好意思再打扰一下,您的修改好像还是有些问题,虽然non_leaf_split_right2返回的split_key正确的,但是non_leaf_split_left和non_leaf_split_right1的左右非叶子节点的个数没有进行修改,导致了不平衡。
已经修正了https://github.com/begeekmyfriend/bplustree/commit/ff6d20912d35426cab4e847d16c7f9606cb2d744 https://github.com/begeekmyfriend/bplustree/commit/9f1ab1f56eb81d4e628344185255cebe7a8a8e14 ,只要split+1即可,年代久远,之前的代码有点生疏了。
如上图,此时是否应该将34作为split_key提到根节点比较合适? 问题逻辑如下: