Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/integration/replication.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,9 @@ foreach disklessload {disabled on-empty-db} {
$replica config set repl-diskless-load $disklessload

# Populate replica with many keys, master with a few keys.
$replica debug populate 4000000
# Using 500K keys instead of 4M to reduce test time while still
# creating a sufficient LOADING window for high-frequency polling.
$replica debug populate 500000
populate 3 master 10

# Start the replication process...
Expand All @@ -1571,14 +1573,12 @@ foreach disklessload {disabled on-empty-db} {
# Discarding old db will take a long time and loading new one
# will be quick. So, if we receive -LOADING, most probably it is
# when flushing the db.
wait_for_condition 1 10000 {
# The LOADING window can be very brief (milliseconds on fast hardware),
# so we use high-frequency polling to reliably catch it.
wait_for_condition 1000 10 {
[catch {$replica ping} err] &&
[string match *LOADING* $err]
} else {
# There is a chance that we may not catch LOADING response
# if flushing db happens too fast compared to test execution
# Then, we may consider increasing key count or introducing
# artificial delay to db flush.
fail "Replica did not reply LOADING."
}

Expand Down
Loading