mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
cea7809cea
Test failed on freebsd: ``` *** [err]: Make the old master a replica of the new one and check conditions in tests/integration/psync2-pingoff.tcl Expected '162' to be equal to '176' (context: type eval line 18 cmd {assert_equal [status $R(0) master_repl_offset] [status $R(1) master_repl_offset]} proc ::test) ``` There are two possible race conditions in the test. 1. The code waits for sync_full to increment, and assumes that means the master did the fork. But in fact there are cases the master will increment that sync_full counter (after replica asks for sync), but will see that there's already a fork running and will delay the fork creation. In this case the INCR will be executed before the fork happens, so it'll not be in the command stream. Solve that by waiting for `master_link_status: up` on the replica before the INCR. 2. The repl-ping-replica-period is still high (1 second), so there's a chance the master will send an additional PING between the two calls to INFO (the line that fails is the one that samples INFO from both servers). So there's a chance one of them will have an incremented offset due to PING and the other won't have it yet. In theory we can wait for the repl_offset to match, but then we risk facing a situation where that race will hide an offset mis-match. so instead, i think we should just change repl-ping-replica-period to prevent further pings from being pushed. Co-authored-by: Oran Agra <oran@redislabs.com> |
||
---|---|---|
.. | ||
aof-race.tcl | ||
aof.tcl | ||
block-repl.tcl | ||
convert-ziplist-hash-on-load.tcl | ||
convert-ziplist-zset-on-load.tcl | ||
convert-zipmap-hash-on-load.tcl | ||
corrupt-dump-fuzzer.tcl | ||
corrupt-dump.tcl | ||
dismiss-mem.tcl | ||
failover.tcl | ||
logging.tcl | ||
psync2-master-restart.tcl | ||
psync2-pingoff.tcl | ||
psync2-reg.tcl | ||
psync2.tcl | ||
rdb.tcl | ||
redis-benchmark.tcl | ||
redis-cli.tcl | ||
replication-2.tcl | ||
replication-3.tcl | ||
replication-4.tcl | ||
replication-buffer.tcl | ||
replication-psync.tcl | ||
replication.tcl |