From ae133d9b9f71f0cbddd875adac0c25dd3acd6b57 Mon Sep 17 00:00:00 2001 From: Yury-Fridlyand Date: Wed, 6 Nov 2024 16:46:11 -0800 Subject: [PATCH] Fix list of readonly commands Signed-off-by: Yury-Fridlyand --- .../redis-rs/redis/src/cluster_routing.rs | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/glide-core/redis-rs/redis/src/cluster_routing.rs b/glide-core/redis-rs/redis/src/cluster_routing.rs index 3ce5175d29..fa40a5d1a7 100644 --- a/glide-core/redis-rs/redis/src/cluster_routing.rs +++ b/glide-core/redis-rs/redis/src/cluster_routing.rs @@ -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" @@ -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" @@ -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" @@ -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" @@ -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"