Description
Feature Request
Is your feature request related to a problem? Please describe
As per the discussion in #632:
The request policy of the KEYS
command specifies that the command should have a request_policy:all_shards
.
127.0.0.1:6379> COMMAND INFO KEYS
1) 1) "keys"
2) (integer) 2
3) 1) readonly
4) (integer) 0
5) (integer) 0
6) (integer) 0
7) 1) @keyspace
2) @read
3) @slow
4) @dangerous
8) 1) "request_policy:all_shards"
2) "nondeterministic_output_order"
9) (empty array)
10) (empty array)
As such the parameters of the command should be considered keyless and the routing should be done to all nodes. Right now we have a K key
parameter, which would assume that we need it for routing.
The underlying logic does route (in multi-shard environments) the command to all shards, but it still treats the parameter as a key for the purposes of serialization.
This is somewhat invalid if a user configures their own codec, because it requires that they treat keys and patterns with the same abstraction.
Describe the solution you'd like
Change the signature to use "String" or some other higher abstraction type, e.g. GlobPattern, GlobArgs ...
Describe alternatives you've considered
Right now any custom codecs need to deal with serializing a GLOB.