From 537c3fd15598f8dee09e94e6a09d2ce972df650d Mon Sep 17 00:00:00 2001 From: Ryan Daum Date: Sat, 30 Dec 2023 09:48:10 -0500 Subject: [PATCH] Fix to broken downcount. --- crates/db/src/tuplebox/slots/slotted_page.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/db/src/tuplebox/slots/slotted_page.rs b/crates/db/src/tuplebox/slots/slotted_page.rs index e9fbc1a9..5357a837 100644 --- a/crates/db/src/tuplebox/slots/slotted_page.rs +++ b/crates/db/src/tuplebox/slots/slotted_page.rs @@ -230,7 +230,7 @@ impl<'a> SlottedPage<'a> { pub(crate) fn dncount(&self, slot_id: SlotId) -> Result<(), SlotBoxError> { let index_entry = self.get_index_entry_mut(slot_id); - let new_count = index_entry.refcount.fetch_sub(1, SeqCst) - 1; + let new_count = index_entry.refcount.fetch_sub(1, SeqCst); if new_count == 0 { self.remove_slot(slot_id)?; }