Some page splits were not properly handled in deletions
[?]
May 16, 2021, 8:02 PM
GGEFV4YYK7E6J3544XSXN5CBASQI3QE6LTFZCJAGOXHEEKD6BRCQCDependencies
- [2]
77TAHKV4Fixing a logical error (again) in del - [3]
LSQ6V7M6Cleanup + docs - [4]
PUOGOIJ3Debugging, impls and version bump - [5]
W2MIZD5BSingle file databases + CRC for the root pages (checking the other pages makes everything very slow) - [6]
7T2CCH3PFixing a segfault (wrong offset in page_unsized::del) - [7]
JIQOPUYHFixing a logical error causing a panic in some very rare cases - [8]
W26CFMAQImproving safety of cursors - [9]
OTWDDJE7Trait/type cleanup - [10]
GPP7KJSFVersion bump - [11]
73Z2UB3JCleanup + comments - [12]
OP6SVMODResetting history - [13]
QEUTVAZ4Splitting btree::page - [14]
DEKK3RUIFixing a bug when splitting unsized pages - [15]
2ZRCQBXPVersion bump - [16]
J7LJZBMESetting reverse cursor to last by default - [17]
HN6Z5DU4Cleanup - [18]
APPY2E7MUnsized deletions + custom sizes back - [19]
Z33OHFPAVersion bump - [20]
T73WR2BXCleaner RC increments for keys and values containing references + more comments in `del` - [21]
DASFQGORDebugging - [*]
TSMS6W4DFully commented implementation of Sized nodes + massive cleanup
Change contents
- edit in sanakirja-core/src/btree/del.rs at line 54[23.36569][23.36569]
// Whether the page we just modified is `self.l`.pub mod_is_left: bool, - edit in sanakirja-core/src/btree/del.rs at line 269
// The following (`mod_is_left`) is meaningless in this// context, and isn't actually used: indeed, the only// place where this field is used is when modifying the// root, when `ins.is_some()`.mod_is_left: true, - replacement in sanakirja-core/src/btree/del.rs at line 380[3.3164]→[3.34236:34259](∅→∅),[3.7480]→[3.34236:34259](∅→∅),[3.20194]→[3.34236:34259](∅→∅),[3.34236]→[3.34236:34259](∅→∅)
mod_is_left: bool,mod_is_left: bool, // The modified page in the `merge` is the left one. - edit in sanakirja-core/src/btree/del.rs at line 402
mod_is_left, - replacement in sanakirja-core/src/btree/del.rs at line 501
let split_key_is_k0 = if cursor.len() + 1 == p0 {let split_key_is_k0 = if cursor.len() == p0 { - replacement in sanakirja-core/src/btree/del.rs at line 514
// If this split isn't at the root, and the page// modified in the last step is the one on the right// of the current entry, move right one step before// inserting the split key/value.// If the page modified in the last step is the one on// the right of the current entry, move right one step// before inserting the split key/value. - edit in sanakirja-core/src/btree/del.rs at line 750
let mut c1 = m.c1.clone();if !m.skip_first && !m.mod_is_left {// This means that the page below just split, since we// have to insert an extra entry on the root page.//// However, the extra entry is to be inserted (by// `P::put`) *before* `c1`'s first element, which is// incorrect since the page that split is the right child// of `c1`'s first element. Therefore, we need to move// `c1` one notch to the right.assert!(m.ins2.is_none());P::move_next(&mut c1);} - replacement in sanakirja-core/src/btree/del.rs at line 768
&m.c1,&c1, - replacement in sanakirja-core/Cargo.toml at line 3
version = "1.2.7"version = "1.2.8"