From 3fac869f02657d94dc89fab23acb8ef188889c96 Mon Sep 17 00:00:00 2001 From: Harkrishn Patro Date: Tue, 24 Oct 2023 01:29:40 -0700 Subject: [PATCH] Fix test, disable expiration until empty buckets are formed (#12689) Test failure on freebsd CI: ``` *** [err]: expire scan should skip dictionaries with lot's of empty buckets in tests/unit/expire.tcl scan didn't handle slot skipping logic. ``` Observation: expiry of keys might happen before the empty buckets are formed and won't help with the expiry skip logic validation. Solution: Disable expiration until the empty buckets are formed. --- tests/unit/expire.tcl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/unit/expire.tcl b/tests/unit/expire.tcl index 672ba1b42..5f69b3866 100644 --- a/tests/unit/expire.tcl +++ b/tests/unit/expire.tcl @@ -836,6 +836,8 @@ start_server {tags {"expire"}} { start_cluster 1 0 {tags {"expire external:skip cluster slow"}} { test "expire scan should skip dictionaries with lot's of empty buckets" { + r debug set-active-expire 0 + # Collect two slots to help determine the expiry scan logic is able # to go past certain slots which aren't valid for scanning at the given point of time. # And the next non empyt slot after that still gets scanned and expiration happens. @@ -860,7 +862,9 @@ start_cluster 1 0 {tags {"expire external:skip cluster slow"}} { r del "{foo}$j" } - # Verify {foo}5 still exists and remaining got cleaned up + r debug set-active-expire 1 + + # Verify {foo}100 still exists and remaining got cleaned up wait_for_condition 20 100 { [r dbsize] eq 1 } else { @@ -889,5 +893,5 @@ start_cluster 1 0 {tags {"expire external:skip cluster slow"}} { } else { fail "Keys did not actively expire." } - } + } {} {needs:debug} }