Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury-Fridlyand committed Oct 2, 2024
1 parent 8e89ad8 commit 35dae5f
Showing 1 changed file with 28 additions and 3 deletions.
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

0 comments on commit 35dae5f

Please sign in to comment.