Skip to content

Commit

Permalink
Fix potential panic bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cloutiertyler committed Jul 10, 2023
1 parent a276045 commit 8386884
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions crates/core/src/db/commit_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ impl CommitLog {

const COMMIT_SIZE: usize = 1;

let tx = datastore.begin_mut_tx();
if unwritten_commit.transactions.len() >= COMMIT_SIZE {
{
let mut guard = self.odb.lock().unwrap();
Expand All @@ -98,8 +97,6 @@ impl CommitLog {
unwritten_commit.min_tx_offset += unwritten_commit.transactions.len() as u64;
unwritten_commit.transactions.clear();

datastore.rollback_mut_tx(tx);

Some(bytes)
} else {
None
Expand Down

0 comments on commit 8386884

Please sign in to comment.