Unverified Commit 886b1170 authored by Binbin's avatar Binbin Committed by GitHub
Browse files

Fix dict don't rehash when there is child test (#13035)

The reason is the same as #13016. The reason is that in #12819,
in cron, in addition to trying to shrink, we will also tyring
to expand. The dict was expanded by cron before we trigger the
bgsave since we do have the enough keys (4096) to hit the radio.

Before the bgsave, we only add 4095 keys to avoid this issue.
parent 1f00c951
...@@ -360,7 +360,7 @@ start_server {tags {"other external:skip"}} { ...@@ -360,7 +360,7 @@ start_server {tags {"other external:skip"}} {
r config set save "" r config set save ""
r config set rdb-key-save-delay 1000000 r config set rdb-key-save-delay 1000000
populate 4096 "" 1 populate 4095 "" 1
r bgsave r bgsave
wait_for_condition 10 100 { wait_for_condition 10 100 {
[s rdb_bgsave_in_progress] eq 1 [s rdb_bgsave_in_progress] eq 1
...@@ -375,7 +375,7 @@ start_server {tags {"other external:skip"}} { ...@@ -375,7 +375,7 @@ start_server {tags {"other external:skip"}} {
waitForBgsave r waitForBgsave r
# Hash table should rehash since there is no child process, # Hash table should rehash since there is no child process,
# size is power of two and over 4098, so it is 8192 # size is power of two and over 4096, so it is 8192
wait_for_condition 50 100 { wait_for_condition 50 100 {
[string match "*table size: 8192*" [r debug HTSTATS 9]] [string match "*table size: 8192*" [r debug HTSTATS 9]]
} else { } else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment