Skip to content

Commit 7d68208

Browse files
authored
Reset later item flag after defrag later is done (redis#12694)
Fixing issues described in redis#12672, started after redis#11695 Related to redis#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 
1 parent ba900f6 commit 7d68208

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/defrag.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,7 @@ void activeDefragCycle(void) {
10531053
continue;
10541054
}
10551055
slot = dbGetNextNonEmptySlot(db, slot, DB_MAIN);
1056+
defrag_later_item_in_progress = 0;
10561057
ctx.slot = slot;
10571058
}
10581059

0 commit comments

Comments
 (0)