redict/tests/unit/moduleapi
Binbin 92fb4f4f61
Fixed SET and BITFIELD commands being wrongly marked movablekeys (#10837)
The SET and BITFIELD command were added `get_keys_function` in #10148, causing
them to be wrongly marked movablekeys in `populateCommandMovableKeys`.

This was an unintended side effect introduced in #10148 (7.0 RC1)
which could cause some clients an extra round trip for these commands in cluster mode.

Since we define movablekeys as a way to determine if the legacy range [first, last, step]
doesn't find all keys, then we need a completely different approach.

The right approach should be to check if the legacy range covers all key-specs,
and if none of the key-specs have the INCOMPLETE flag. 
This way, we don't need to look at getkeys_proc of VARIABLE_FLAG at all.
Probably with the exception of modules, who may still not be using key-specs.

In this PR, we removed `populateCommandMovableKeys` and put its logic in
`populateCommandLegacyRangeSpec`.
In order to properly serve both old and new modules, we must probably keep relying
CMD_MODULE_GETKEYS, but do that only for modules that don't declare key-specs. 
For ones that do, we need to take the same approach we take with native redis commands.

This approach was proposed by Oran. Fixes #10833

Co-authored-by: Oran Agra <oran@redislabs.com>
2022-06-12 08:22:18 +03:00
..
aclcheck.tcl Allow specifying ACL reason for module log entry (#10559) 2022-04-11 22:16:17 -07:00
auth.tcl Fix module redact test for valgrind (#10432) 2022-03-16 08:53:57 +02:00
basics.tcl Fix incorrect error code for eval scripts and fix test error checking (#10575) 2022-04-14 11:18:32 +03:00
blockedclient.tcl Fix regression not aborting transaction on error, and re-edit some error responses (#10612) 2022-04-25 13:08:13 +03:00
blockonbackground.tcl
blockonkeys.tcl XREADGROUP: Unblock client if stream is deleted (#10306) 2022-03-08 17:10:36 +02:00
cluster.tcl By default prevent cross slot operations in functions and scripts with # (#10615) 2022-04-26 12:09:21 +03:00
cmdintrospection.tcl COMMAND DOCS shows module name, where applicable (#10544) 2022-04-10 11:41:31 +03:00
commandfilter.tcl
datatype2.tcl
datatype.tcl
defrag.tcl
eventloop.tcl
fork.tcl Fix race in module fork kill test (#10717) 2022-05-12 20:10:38 +03:00
getchannels.tcl
getkeys.tcl
hash.tcl
hooks.tcl Modules: Add REDISMODULE_EVENT_CONFIG (#10311) 2022-03-07 17:37:57 +02:00
infotest.tcl
infra.tcl
keyspace_events.tcl Test: RM_Call from within "expired" notification (#10613) 2022-04-25 13:05:06 +03:00
keyspecs.tcl Fixed SET and BITFIELD commands being wrongly marked movablekeys (#10837) 2022-06-12 08:22:18 +03:00
list.tcl
mallocsize.tcl Add RM_MallocSizeString, RM_MallocSizeDict (#10542) 2022-04-17 08:31:57 +03:00
misc.tcl Expose script flags to processCommand for better handling (#10744) 2022-06-01 14:09:40 +03:00
moduleconfigs.tcl Bug fixes for enum configs with overlapping bit flags (module API) (#10661) 2022-05-09 13:36:53 +03:00
propagate.tcl Test: RM_Call from within "expired" notification (#10613) 2022-04-25 13:05:06 +03:00
publish.tcl Sharded pubsub publish messagebulk as smessage (#10792) 2022-05-31 08:03:59 +03:00
reply.tcl
scan.tcl
stream.tcl
subcommands.tcl Fix regression not aborting transaction on error, and re-edit some error responses (#10612) 2022-04-25 13:08:13 +03:00
test_lazyfree.tcl
testrdb.tcl
timer.tcl
zset.tcl