Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential panic in repair #861

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,18 +504,6 @@ impl Database {
if let Some(header) = savepoint.get_user_root() {
Self::check_pages_allocated_recursive(header.root, mem.clone())?;
}
if let Some(header) = savepoint.get_freed_root() {
let freed_pages_iter = AllPageNumbersBtreeIter::new(
header.root,
FreedTableKey::fixed_width(),
FreedPageList::fixed_width(),
mem.clone(),
)?;
for page_number in freed_pages_iter {
let page = page_number?;
assert!(mem.is_allocated(page));
}
}
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/tree_store/page_store/savepoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ impl Savepoint {
self.user_root
}

pub(crate) fn get_freed_root(&self) -> Option<BtreeHeader> {
self.freed_root
}

pub(crate) fn db_address(&self) -> *const TransactionTracker {
self.transaction_tracker.as_ref() as *const _
}
Expand Down
Loading