summaryrefslogtreecommitdiff
path: root/tests/assets
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2022-01-17 14:11:11 +0200
committerGitHub <noreply@github.com>2022-01-17 14:11:11 +0200
commitae89958972ee720be2bff68231d6353553c2272a (patch)
treed0cc61d5bc718b7c5077e5746abb802184423851 /tests/assets
parent90916f16a5536bc833529d2e563d1094433de495 (diff)
downloadredis-ae89958972ee720be2bff68231d6353553c2272a.tar.gz
Set repl-diskless-sync to yes by default, add repl-diskless-sync-max-replicas (#10092)
1. enable diskless replication by default 2. add a new config named repl-diskless-sync-max-replicas that enables replication to start before the full repl-diskless-sync-delay was reached. 3. put replica online sooner on the master (see below) 4. test suite uses repl-diskless-sync-delay of 0 to be faster 5. a few tests that use multiple replica on a pre-populated master, are now using the new repl-diskless-sync-max-replicas 6. fix possible timing issues in a few cluster tests (see below) put replica online sooner on the master ---------------------------------------------------- there were two tests that failed because they needed for the master to realize that the replica is online, but the test code was actually only waiting for the replica to realize it's online, and in diskless it could have been before the master realized it. changes include two things: 1. the tests wait on the right thing 2. issues in the master, putting the replica online in two steps. the master used to put the replica as online in 2 steps. the first step was to mark it as online, and the second step was to enable the write event (only after getting ACK), but in fact the first step didn't contains some of the tasks to put it online (like updating good slave count, and sending the module event). this meant that if a test was waiting to see that the replica is online form the point of view of the master, and then confirm that the module got an event, or that the master has enough good replicas, it could fail due to timing issues. so now the full effect of putting the replica online, happens at once, and only the part about enabling the writes is delayed till the ACK. fix cluster tests -------------------- I added some code to wait for the replica to sync and avoid race conditions. later realized the sentinel and cluster tests where using the original 5 seconds delay, so changed it to 0. this means the other changes are probably not needed, but i suppose they're still better (avoid race conditions)
Diffstat (limited to 'tests/assets')
-rw-r--r--tests/assets/default.conf1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/assets/default.conf b/tests/assets/default.conf
index ef15b1041..42297903f 100644
--- a/tests/assets/default.conf
+++ b/tests/assets/default.conf
@@ -11,6 +11,7 @@ loglevel verbose
logfile ''
databases 16
latency-monitor-threshold 1
+repl-diskless-sync-delay 0
save 900 1
save 300 10