Skip to content

Commit

Permalink
Try to fix a race in psync2 test (redis#11553)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
oranagra authored and madolson committed Apr 19, 2023
1 parent 05105ff commit 5467a18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integration/psync2.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,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] &&
Expand Down

0 comments on commit 5467a18

Please sign in to comment.