From af49d40962d44c08d25d3d7454ca5876df2546c7 Mon Sep 17 00:00:00 2001 From: Michael Constant Date: Mon, 18 Nov 2024 16:48:11 -0800 Subject: [PATCH] Don't flush allocator state after a failed repair If repair fails, our allocator state is inconsistent; don't try to write it to disk --- src/tree_store/page_store/page_manager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tree_store/page_store/page_manager.rs b/src/tree_store/page_store/page_manager.rs index f0dd6631..3aeac228 100644 --- a/src/tree_store/page_store/page_manager.rs +++ b/src/tree_store/page_store/page_manager.rs @@ -1129,7 +1129,7 @@ impl TransactionalMemory { impl Drop for TransactionalMemory { fn drop(&mut self) { - if thread::panicking() { + if thread::panicking() || self.needs_recovery.load(Ordering::Acquire) { return; }