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.
This commit is contained in:
Harkrishn Patro 2023-10-24 01:29:40 -07:00 committed by GitHub
parent 26eb4ce397
commit 3fac869f02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}
}