Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add commands from server modules #193

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions redis/src/cluster_routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,14 @@ impl ResponsePolicy {
Some(ResponsePolicy::AllSucceeded)
}

b"KEYS" | b"MGET" | b"SLOWLOG GET" | b"PUBSUB CHANNELS" | b"PUBSUB SHARDCHANNELS" => {
Some(ResponsePolicy::CombineArrays)
}
b"KEYS"
| b"FT._ALIASLIST"
| b"FT._LIST"
| b"MGET"
| b"SLOWLOG GET"
| b"PUBSUB CHANNELS"
| b"PUBSUB SHARDCHANNELS" => Some(ResponsePolicy::CombineArrays),

b"PUBSUB NUMSUB" | b"PUBSUB SHARDNUMSUB" => Some(ResponsePolicy::CombineMaps),

b"FUNCTION KILL" | b"SCRIPT KILL" => Some(ResponsePolicy::OneSucceeded),
Expand Down Expand Up @@ -426,6 +431,8 @@ fn base_routing(cmd: &[u8]) -> RouteBy {
b"DBSIZE"
| b"FLUSHALL"
| b"FLUSHDB"
| b"FT._ALIASLIST"
| b"FT._LIST"
| b"FUNCTION DELETE"
| b"FUNCTION FLUSH"
| b"FUNCTION LOAD"
Expand Down Expand Up @@ -686,6 +693,14 @@ pub fn is_readonly_cmd(cmd: &[u8]) -> bool {
| b"EXISTS"
| b"EXPIRETIME"
| b"FCALL_RO"
| b"FT.AGGREGATE"
| b"FT.EXPLAIN"
| b"FT.EXPLAINCLI"
| b"FT.INFO"
| b"FT.PROFILE"
| b"FT.SEARCH"
| b"FT._ALIASLIST"
| b"FT._LIST"
| b"FUNCTION DUMP"
| b"FUNCTION KILL"
| b"FUNCTION LIST"
Expand All @@ -709,6 +724,16 @@ pub fn is_readonly_cmd(cmd: &[u8]) -> bool {
| b"HSCAN"
| b"HSTRLEN"
| b"HVALS"
| b"JSON.ARRINDEX"
| b"JSON.ARRLEN"
| b"JSON.DEBUG"
| b"JSON.GET"
| b"JSON.OBJLEN"
| b"JSON.OBJKEYS"
| b"JSON.MGET"
| b"JSON.RESP"
| b"JSON.STRLEN"
| b"JSON.TYPE"
| b"KEYS"
| b"LCS"
| b"LINDEX"
Expand Down