pijul nest
guest [sign in]

When deletions in a right child caused a page split, we were not moving the correct cursor to the right

pmeunier
Jul 30, 2021, 5:03 PM
UWS2Q5CWDXNNW4SVOA5DNZWG46TP5PLGK6PEUVXDEFNVJOEAHEMAC

Dependencies

  • [2] 77TAHKV4 Fixing a logical error (again) in del
  • [3] T73WR2BX Cleaner RC increments for keys and values containing references + more comments in `del`
  • [4] JIQOPUYH Fixing a logical error causing a panic in some very rare cases
  • [5] L5CVF6UJ Debugging
  • [*] OP6SVMOD Resetting history

Change contents

  • edit in sanakirja-core/src/btree/del.rs at line 534
    [2.516]
    [3.365]
    //
    // This can happen in exactly two situations:
    // - when the element we are deleting is the one we are
    // skipping here.
    // - when we are deleting in the rightmost child of a
    // page.
  • replacement in sanakirja-core/src/btree/del.rs at line 541
    [3.419][3.6613:6666](),[3.6613][3.6613:6666](),[3.6666][2.517:569]()
    let curs = cursor.current_mut();
    P::move_next(&mut curs.cursor);
    [3.419]
    [3.6718]
    P::move_next(&mut last_op.c1);