diff options
author | Oran Agra <oran@redislabs.com> | 2022-11-30 22:03:23 +0200 |
---|---|---|
committer | Oran Agra <oran@redislabs.com> | 2022-12-12 17:02:54 +0200 |
commit | 0a3ae0f0a4ee864554b4393dc83662d3f2637e26 (patch) | |
tree | dfb995481cbdd4ab81036b571b66634ad7f23686 | |
parent | 6029bd560e38d2f1c34c1f7ce5e3a394d4937c92 (diff) | |
download | redis-0a3ae0f0a4ee864554b4393dc83662d3f2637e26.tar.gz |
Try to fix a race in psync2 test (#11553)
This test sets the master ping interval to 1 hour, in order to avoid
pings in the replicatoin stream incrementing the replication offset,
however, it didn't increase the repl-timeout so on slow machines
where the test took more than 60 seconds, the replicas would drop
and reconnect.
```
*** [err]: PSYNC2: Partial resync after restart using RDB aux fields in tests/integration/psync2.tcl
Replica didn't partial sync
```
The test would detect 4 additional partial syncs where it expects
only one.
(cherry picked from commit b0250b4508c9ed527fb0c885f615ae97975f3b2d)
-rw-r--r-- | tests/integration/psync2.tcl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/integration/psync2.tcl b/tests/integration/psync2.tcl index 8f8db5a92..43ff567bf 100644 --- a/tests/integration/psync2.tcl +++ b/tests/integration/psync2.tcl @@ -232,6 +232,10 @@ start_server {} { # In absence of pings, are the instances really able to have # the exact same offset? $R($master_id) config set repl-ping-replica-period 3600 + for {set j 0} {$j < 5} {incr j} { + if {$j == $master_id} continue + $R($j) config set repl-timeout 10000 + } wait_for_condition 500 100 { [status $R($master_id) master_repl_offset] == [status $R(0) master_repl_offset] && [status $R($master_id) master_repl_offset] == [status $R(1) master_repl_offset] && |