mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-09 18:24:20 +01:00
free no longer used pages after balance
This commit is contained in:
@@ -2045,7 +2045,11 @@ impl BTreeCursor {
|
||||
rightmost_pointer,
|
||||
);
|
||||
// TODO: balance root
|
||||
// TODO: free pages
|
||||
// We have to free pages that are not used anymore
|
||||
for i in sibling_count_new..balance_info.sibling_count {
|
||||
let page = &balance_info.pages_to_balance[i];
|
||||
self.pager.free_page(Some(page.clone()), page.get().id)?;
|
||||
}
|
||||
(WriteState::BalanceStart, Ok(CursorResult::Ok(())))
|
||||
}
|
||||
WriteState::Finish => todo!(),
|
||||
|
||||
Reference in New Issue
Block a user