Skip to content

Commit

Permalink
Improve assertions
Browse files Browse the repository at this point in the history
Now that the savepoint repair code has been fixed, it should not be possible to
double mark a page during repair
  • Loading branch information
cberner committed Sep 7, 2024
1 parent 0ce3b94 commit d3bae13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ impl Database {
FreedPageList::fixed_width(),
mem.clone(),
)?;
mem.mark_pages_allocated(freed_pages_iter, true)?;
mem.mark_pages_allocated(freed_pages_iter, false)?;
}

let freed_table: ReadOnlyTable<FreedTableKey, FreedPageList<'static>> = ReadOnlyTable::new(
Expand All @@ -534,7 +534,7 @@ impl Database {
for i in 0..freed_page_list.value().len() {
freed_page_list_as_vec.push(Ok(freed_page_list.value().get(i)));
}
mem.mark_pages_allocated(freed_page_list_as_vec.into_iter(), true)?;
mem.mark_pages_allocated(freed_page_list_as_vec.into_iter(), false)?;
}

Ok(())
Expand Down

0 comments on commit d3bae13

Please sign in to comment.