From 7d68208a6ea7d57a58d9f3548ea5b11d2caed272 Mon Sep 17 00:00:00 2001 From: Roshan Khatri <117414976+roshkhatri@users.noreply.github.com> Date: Fri, 27 Oct 2023 03:56:15 -0700 Subject: [PATCH] Reset later item flag after defrag later is done (#12694) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixing issues described in #12672, started after #11695 Related to #12674 Fixes the `defrag didn't stop' issue. In some cases of how the keys were stored in memory defrag_later_item_in_progress was not getting reset once we finish defragging the later items and we move to the next slot. This stopped the scan to happen in the later slots and did not get  --- src/defrag.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/defrag.c b/src/defrag.c index 92f335c2e..130913339 100644 --- a/src/defrag.c +++ b/src/defrag.c @@ -1053,6 +1053,7 @@ void activeDefragCycle(void) { continue; } slot = dbGetNextNonEmptySlot(db, slot, DB_MAIN); + defrag_later_item_in_progress = 0; ctx.slot = slot; }