redict/tests/unit/moduleapi
Oran Agra ae89958972
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)
2022-01-17 14:11:11 +02:00
..
aclcheck.tcl Adding ACL support for modules (#9309) 2021-09-23 08:52:56 +03:00
auth.tcl Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
basics.tcl Protected configs and sensitive commands (#9920) 2021-12-19 10:46:16 +02:00
blockedclient.tcl Fix module blocked clients RESP version (#9634) 2021-10-21 14:01:10 +03:00
blockonbackground.tcl Changed latency histogram output to omit trailing 0s and periods (#10075) 2022-01-09 17:04:18 -08:00
blockonkeys.tcl Test that module can wake up module blocked on non-empty list key (#8382) 2021-01-22 16:19:37 +02:00
cluster.tcl fix new cluster tests issues (#9657) 2021-10-20 15:40:28 +03:00
commandfilter.tcl Remove const from CommandFilterArgGet result (#9247) 2021-08-01 11:29:32 +03:00
datatype2.tcl Tests: don't rely on the response of MEMORY USAGE when mem_allocator is not jemalloc (#10010) 2021-12-27 21:37:21 +02:00
datatype.tcl Modules: add RM_LoadDataTypeFromStringEncver (#9537) 2021-09-30 11:21:32 +03:00
defrag.tcl Tests: fix new defrag test to be skipped when not supported (#8185) 2020-12-14 11:13:46 +02:00
fork.tcl Set errno to EEXIST in redisFork() if child process exists (#10059) 2022-01-06 09:54:21 +02:00
getkeys.tcl Auto-generate the command table from JSON files (#9656) 2021-12-15 21:23:15 +02:00
hash.tcl Modules: In RM_HashSet, add COUNT_ALL flag and set errno (#8446) 2021-02-15 11:40:05 +02:00
hooks.tcl Set repl-diskless-sync to yes by default, add repl-diskless-sync-max-replicas (#10092) 2022-01-17 14:11:11 +02:00
infotest.tcl Escape unsafe field name characters in INFO. (#8492) 2021-02-15 17:08:53 +02:00
infra.tcl add test for modules load/unload and config rewrite 2021-06-01 13:43:48 +03:00
keyspace_events.tcl Modules: adding a module type for key space notification (#8759) 2021-04-19 21:33:26 +03:00
keyspecs.tcl Move doc metadata from COMMAND to COMMAND DOCS (#10056) 2022-01-11 17:16:16 +02:00
list.tcl Modules: Add remaining list API functions (#8439) 2021-09-14 17:48:06 +03:00
misc.tcl Added RM_MonotonicMicroseconds() API to provide monotonic time function (#10101) 2022-01-13 11:36:03 +02:00
propagate.tcl use startEvictionTimeProc() in config set maxmemory (#10019) 2022-01-04 13:08:10 +02:00
reply.tcl fix valgrind issues with long double module test (#9709) 2021-11-01 13:41:35 +02:00
scan.tcl Fix RM_ScanKey module api not to return int encoded strings 2020-06-14 11:20:15 +03:00
stream.tcl Add modules API for streams (#8288) 2021-01-28 16:19:43 +02:00
subcommands.tcl Move doc metadata from COMMAND to COMMAND DOCS (#10056) 2022-01-11 17:16:16 +02:00
test_lazyfree.tcl Sort out mess around propagation and MULTI/EXEC (#9890) 2021-12-23 00:03:48 +02:00
testrdb.tcl Wait for asyn_loading to stop in short read test (#9841) 2021-11-24 12:46:43 +02:00
timer.tcl Add timer module API tests. (#8041) 2020-11-11 22:57:33 +02:00
zset.tcl RM_ZsetRem: Delete key if empty (#8453) 2021-02-05 19:54:01 +02:00