Skip to content

Commit

Permalink
Fix list of readonly commands
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand authored and barshaul committed Nov 7, 2024
1 parent 7c2c5e4 commit ae133d9
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions glide-core/redis-rs/redis/src/cluster_routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,52 @@ pub fn is_readonly_cmd(cmd: &[u8]) -> bool {
b"BITCOUNT"
| b"BITFIELD_RO"
| b"BITPOS"
| b"CLIENT ID"
| b"CLIENT CACHING"
| b"CLIENT CAPA"
| b"CLIENT GETNAME"
| b"CLIENT GETREDIR"
| b"CLIENT HELP"
| b"CLIENT INFO"
| b"CLIENT KILL"
| b"CLIENT LIST"
| b"CLIENT NO-EVICT"
| b"CLIENT NO-TOUCH"
| b"CLIENT PAUSE"
| b"CLIENT REPLY"
| b"CLIENT SETINFO"
| b"CLIENT SETNAME"
| b"CLIENT TRACKING"
| b"CLIENT TRACKINGINFO"
| b"CLIENT UNBLOCK"
| b"CLIENT UNPAUSE"
| b"CLUSTER COUNT-FAILURE-REPORTS"
| b"CLUSTER COUNTKEYSINSLOT"
| b"CLUSTER FAILOVER"
| b"CLUSTER GETKEYSINSLOT"
| b"CLUSTER HELP"
| b"CLUSTER INFO"
| b"CLUSTER KEYSLOT"
| b"CLUSTER LINKS"
| b"CLUSTER MYID"
| b"CLUSTER MYSHARDID"
| b"CLUSTER NODES"
| b"CLUSTER REPLICATE"
| b"CLUSTER SAVECONFIG"
| b"CLUSTER SHARDS"
| b"CLUSTER SLOTS"
| b"COMMAND COUNT"
| b"COMMAND DOCS"
| b"COMMAND GETKEYS"
| b"COMMAND GETKEYSANDFLAGS"
| b"COMMAND HELP"
| b"COMMAND INFO"
| b"COMMAND LIST"
| b"CONFIG GET"
| b"CONFIG HELP"
| b"CONFIG RESETSTAT"
| b"CONFIG REWRITE"
| b"CONFIG SET"
| b"DBSIZE"
| b"DUMP"
| b"EVAL_RO"
Expand All @@ -888,6 +934,7 @@ pub fn is_readonly_cmd(cmd: &[u8]) -> bool {
| b"FT._ALIASLIST"
| b"FT._LIST"
| b"FUNCTION DUMP"
| b"FUNCTION HELP"
| b"FUNCTION KILL"
| b"FUNCTION LIST"
| b"FUNCTION STATS"
Expand All @@ -900,6 +947,7 @@ pub fn is_readonly_cmd(cmd: &[u8]) -> bool {
| b"GET"
| b"GETBIT"
| b"GETRANGE"
| b"HELLO"
| b"HEXISTS"
| b"HGET"
| b"HGETALL"
Expand All @@ -920,23 +968,55 @@ pub fn is_readonly_cmd(cmd: &[u8]) -> bool {
| b"JSON.RESP"
| b"JSON.STRLEN"
| b"JSON.TYPE"
| b"INFO"
| b"KEYS"
| b"LASTSAVE"
| b"LATENCY DOCTOR"
| b"LATENCY GRAPH"
| b"LATENCY HELP"
| b"LATENCY HISTOGRAM"
| b"LATENCY HISTORY"
| b"LATENCY LATEST"
| b"LATENCY RESET"
| b"LCS"
| b"LINDEX"
| b"LLEN"
| b"LOLWUT"
| b"LPOS"
| b"LRANGE"
| b"MEMORY DOCTOR"
| b"MEMORY HELP"
| b"MEMORY MALLOC-STATS"
| b"MEMORY PURGE"
| b"MEMORY STATS"
| b"MEMORY USAGE"
| b"MGET"
| b"MODULE HELP"
| b"MODULE LIST"
| b"MODULE LOAD"
| b"MODULE LOADEX"
| b"MODULE UNLOAD"
| b"OBJECT ENCODING"
| b"OBJECT FREQ"
| b"OBJECT HELP"
| b"OBJECT IDLETIME"
| b"OBJECT REFCOUNT"
| b"PEXPIRETIME"
| b"PFCOUNT"
| b"PING"
| b"PTTL"
| b"PUBLISH"
| b"PUBSUB CHANNELS"
| b"PUBSUB HELP"
| b"PUBSUB NUMPAT"
| b"PUBSUB NUMSUB"
| b"PUBSUB SHARDCHANNELS"
| b"PUBSUB SHARDNUMSUB"
| b"RANDOMKEY"
| b"REPLICAOF"
| b"RESET"
| b"ROLE"
| b"SAVE"
| b"SCAN"
| b"SCARD"
| b"SCRIPT DEBUG"
Expand All @@ -946,22 +1026,35 @@ pub fn is_readonly_cmd(cmd: &[u8]) -> bool {
| b"SCRIPT LOAD"
| b"SCRIPT SHOW"
| b"SDIFF"
| b"SELECT"
| b"SHUTDOWN"
| b"SINTER"
| b"SINTERCARD"
| b"SISMEMBER"
| b"SMEMBERS"
| b"SMISMEMBER"
| b"SLOWLOG GET"
| b"SLOWLOG HELP"
| b"SLOWLOG LEN"
| b"SLOWLOG RESET"
| b"SORT_RO"
| b"SPUBLISH"
| b"SRANDMEMBER"
| b"SSCAN"
| b"SSUBSCRIBE"
| b"STRLEN"
| b"SUBSCRIBE"
| b"SUBSTR"
| b"SUNION"
| b"SUNSUBSCRIBE"
| b"TIME"
| b"TOUCH"
| b"TTL"
| b"TYPE"
| b"UNSUBSCRIBE"
| b"XINFO CONSUMERS"
| b"XINFO GROUPS"
| b"XINFO HELP"
| b"XINFO STREAM"
| b"XLEN"
| b"XPENDING"
Expand Down

0 comments on commit ae133d9

Please sign in to comment.