redict/tests/modules
Viktor Söderqvist acf3495eb8
Sort out the mess around writable replicas and lookupKeyRead/Write (#9572)
Writable replicas now no longer use the values of expired keys. Expired keys are
deleted when lookupKeyWrite() is used, even on a writable replica. Previously,
writable replicas could use the value of an expired key in write commands such
as INCR, SUNIONSTORE, etc..

This commit also sorts out the mess around the functions lookupKeyRead() and
lookupKeyWrite() so they now indicate what we intend to do with the key and
are not affected by the command calling them.

Multi-key commands like SUNIONSTORE, ZUNIONSTORE, COPY and SORT with the
store option now use lookupKeyRead() for the keys they're reading from (which will
not allow reading from logically expired keys).

This commit also fixes a bug where PFCOUNT could return a value of an
expired key.

Test modules commands have their readonly and write flags updated to correctly
reflect their lookups for reading or writing. Modules are not required to
correctly reflect this in their command flags, but this change is made for
consistency since the tests serve as usage examples.

Fixes #6842. Fixes #7475.
2021-11-28 11:26:28 +02:00
..
aclcheck.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
auth.c Fixed some documentation 2019-12-17 07:49:21 +00:00
basics.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
blockedclient.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
blockonbackground.c Fix memory leak due to missing freeCallback in blockonbackground moduleapi test (#9499) 2021-09-14 15:14:09 +03:00
blockonkeys.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
commandfilter.c Tests: fix commandfilter crash on alpine. (#9307) 2021-08-02 15:50:45 +03:00
datatype2.c Modify mem_usage2 module callback to enable to take sample_size argument (#9612) 2021-10-17 17:31:06 +03:00
datatype.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
defragtest.c Enhance mem_usage/free_effort/unlink/copy callbacks and add GetDbFromIO api. (#8999) 2021-06-16 09:45:49 +03:00
fork.c Moved RMAPI_FUNC_SUPPORTED location such that it will be visible to modules (#8037) 2020-11-09 10:46:23 +02:00
getkeys.c Replace deprecated REDISMODULE_POSTPONED_ARRAY_LEN in module tests and examples (#9677) 2021-10-25 12:00:43 +03:00
hash.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
hooks.c Add Module API for version and compatibility checks (#7865) 2020-10-11 17:21:58 +03:00
infotest.c Escape unsafe field name characters in INFO. (#8492) 2021-02-15 17:08:53 +02:00
keyspace_events.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
keyspecs.c A better approach for COMMAND INFO for movablekeys commands (#8324) 2021-09-15 11:10:29 +03:00
list.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
Makefile Use 'gcc' instead of 'ld' to link test modules. (#9710) 2021-10-31 16:25:57 +02:00
misc.c QUIT is a command, HOST: and POST are not (#9798) 2021-11-23 10:38:25 +02:00
propagate.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
reply.c Add RM_ReplyWithBigNumber module API (#9639) 2021-10-25 11:31:20 +03:00
scan.c Replace deprecated REDISMODULE_POSTPONED_ARRAY_LEN in module tests and examples (#9677) 2021-10-25 12:00:43 +03:00
stream.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
subcommands.c Treat subcommands as commands (#9504) 2021-10-20 11:52:57 +03:00
test_lazyfree.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
testrdb.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00
timer.c Add timer module API tests. (#8041) 2020-11-11 22:57:33 +02:00
zset.c Sort out the mess around writable replicas and lookupKeyRead/Write (#9572) 2021-11-28 11:26:28 +02:00