mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
ITS#8300 fix rebalance after node_move
ITS#8258, ITS#7829 fixes checked parent index to see if we were moving from a left neighbor. Should have just checked to see if current index was 0, meaning we added on the left. (Parent index may not tell us anything meaningful after a nested rebalance.)
This commit is contained in:
parent
4359ffe08f
commit
af45cf3a04
1 changed files with 2 additions and 1 deletions
|
|
@ -8009,7 +8009,8 @@ mdb_rebalance(MDB_cursor *mc)
|
||||||
*/
|
*/
|
||||||
if (PAGEFILL(mc->mc_txn->mt_env, mn.mc_pg[mn.mc_top]) >= thresh && NUMKEYS(mn.mc_pg[mn.mc_top]) > minkeys) {
|
if (PAGEFILL(mc->mc_txn->mt_env, mn.mc_pg[mn.mc_top]) >= thresh && NUMKEYS(mn.mc_pg[mn.mc_top]) > minkeys) {
|
||||||
rc = mdb_node_move(&mn, mc);
|
rc = mdb_node_move(&mn, mc);
|
||||||
if (mc->mc_ki[mc->mc_top-1]) {
|
if (!mc->mc_ki[mc->mc_top]) {
|
||||||
|
/* if we inserted on left, bump position up */
|
||||||
oldki++;
|
oldki++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue