Skip to content

Commit

Permalink
Remove attempted free uncommited in restore_savepoint
Browse files Browse the repository at this point in the history
This can't happen, since we only restore at the beginning of a clean
transaction
  • Loading branch information
cberner committed Jul 27, 2024
1 parent 73f1c45 commit 819ccf9
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,11 +735,7 @@ impl WriteTransaction {
if referenced_by_system_tree.contains(&page) {
continue;
}
if self.mem.uncommitted(page) {
self.mem.free(page);
} else {
freed_pages.push(page);
}
freed_pages.push(page);
}
*self.freed_pages.lock().unwrap() = freed_pages;
self.tables.lock().unwrap().table_tree = TableTreeMut::new(
Expand Down Expand Up @@ -779,12 +775,8 @@ impl WriteTransaction {
&& !freed_pages_hash.contains(&page)
&& !referenced_by_system_tree.contains(&page)
{
if self.mem.uncommitted(page) {
self.mem.free(page);
} else {
freed_pages.push(page);
freed_pages_hash.insert(page);
}
freed_pages.push(page);
freed_pages_hash.insert(page);
}
}
}
Expand Down

0 comments on commit 819ccf9

Please sign in to comment.