Skip to content

Commit ca0814d

Browse files
committed
Fix potential panic bug
1 parent eab95af commit ca0814d

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

crates/core/src/db/commit_log.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ impl CommitLog {
7676

7777
const COMMIT_SIZE: usize = 1;
7878

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

101-
datastore.rollback_mut_tx(tx);
102-
103100
Some(bytes)
104101
} else {
105102
None

0 commit comments

Comments
 (0)