mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-04 00:44:19 +01:00
Merge 'reset move_to_right_state cached state in case of quick balancing' from Nikita Sivukhin
Reset cached value for `move_to_right_state` in case of `balance_quick`. I don't know if it's possible to hit this situation with current generation of VM programs - so don't know what test I can add here. Reviewed-by: Preston Thorpe <preston@turso.tech> Closes #3858
This commit is contained in:
@@ -2589,6 +2589,9 @@ impl BTreeCursor {
|
||||
/// 4. Continue balance from the parent page (inserting the new divider cell may have overflowed the parent)
|
||||
#[instrument(skip(self), level = Level::DEBUG)]
|
||||
fn balance_quick(&mut self) -> Result<IOResult<()>> {
|
||||
// Since we are going to change the btree structure, let's forget our cached knowledge of the rightmost page.
|
||||
let _ = self.move_to_right_state.1.take();
|
||||
|
||||
// Allocate a new leaf page and insert the overflow cell payload in it.
|
||||
let new_rightmost_leaf = return_if_io!(self.pager.do_allocate_page(
|
||||
PageType::TableLeaf,
|
||||
|
||||
Reference in New Issue
Block a user