pijul nest
guest [sign in]

Page_unsized was counting the offsets of internal nodes twice when compacting

pmeunier
Jul 30, 2021, 5:32 PM
WPFTIQGXS25SVUSZERARYO4VOXUPOERS7WL3ERSRVKOUAVQLSA4QC

Dependencies

Change contents

  • replacement in sanakirja-core/src/btree/page_unsized/put.rs at line 34
    [3.2437][3.3411:3453](),[3.6406][3.3411:3453](),[3.3411][3.3411:3453]()
    size as isize - cur_size as isize
    [3.6406]
    [3.3453]
    // Since `size` isn't counting the size of the 64-bit offset,
    // and `cur_size` is, we need to add 8.
    8 + size as isize - cur_size as isize
  • edit in sanakirja-core/src/btree/page_unsized/alloc.rs at line 28
    [2.32526][2.32526:32588]()
    + (hdr.n() as isize) * Self::OFFSET_SIZE as isize