From 8386884df43bf46c88310033cb0e238cae27a1a0 Mon Sep 17 00:00:00 2001 From: Tyler Cloutier Date: Mon, 10 Jul 2023 02:10:10 -0700 Subject: [PATCH] Fix potential panic bug --- crates/core/src/db/commit_log.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/core/src/db/commit_log.rs b/crates/core/src/db/commit_log.rs index 55f3c09e05..0f34d06967 100644 --- a/crates/core/src/db/commit_log.rs +++ b/crates/core/src/db/commit_log.rs @@ -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(); @@ -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