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:
parent
26eb4ce397
commit
3fac869f02
@ -836,6 +836,8 @@ start_server {tags {"expire"}} {
|
|||||||
|
|
||||||
start_cluster 1 0 {tags {"expire external:skip cluster slow"}} {
|
start_cluster 1 0 {tags {"expire external:skip cluster slow"}} {
|
||||||
test "expire scan should skip dictionaries with lot's of empty buckets" {
|
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
|
# 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.
|
# 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.
|
# 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"
|
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 {
|
wait_for_condition 20 100 {
|
||||||
[r dbsize] eq 1
|
[r dbsize] eq 1
|
||||||
} else {
|
} else {
|
||||||
@ -889,5 +893,5 @@ start_cluster 1 0 {tags {"expire external:skip cluster slow"}} {
|
|||||||
} else {
|
} else {
|
||||||
fail "Keys did not actively expire."
|
fail "Keys did not actively expire."
|
||||||
}
|
}
|
||||||
}
|
} {} {needs:debug}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user