Skip to content

Commit

Permalink
Add missing readonly commands. (#2649)
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
  • Loading branch information
Yury-Fridlyand authored Nov 14, 2024
1 parent 7d72b87 commit de7892c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
* Core: Add support for sending multi-slot JSON.MSET and JSON.MGET commands ([#2587]https://github.com/valkey-io/valkey-glide/pull/2587)
* Node: Add `JSON.DEBUG` command ([#2572](https://github.com/valkey-io/valkey-glide/pull/2572))
* Node: Add `JSON.NUMINCRBY` and `JSON.NUMMULTBY` command ([#2555](https://github.com/valkey-io/valkey-glide/pull/2555))
* Core: Fix list of readonly commands ([#2634](https://github.com/valkey-io/valkey-glide/pull/2634), [#2649](https://github.com/valkey-io/valkey-glide/pull/2649))
* Core: Improve retry logic and update unmaintained dependencies for Rust lint CI ([#2673](https://github.com/valkey-io/valkey-glide/pull/2643))
* Core: Release the read lock while creating connections in `refresh_connections` ([#2630](https://github.com/valkey-io/valkey-glide/issues/2630))
* Core: SlotMap refactor - Added NodesMap, Update the slot map upon MOVED errors ([#2682](https://github.com/valkey-io/valkey-glide/issues/2682))
Expand Down
19 changes: 18 additions & 1 deletion glide-core/redis-rs/redis/src/cluster_routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,23 @@ pub fn is_readonly(routable: &impl Routable) -> bool {
pub fn is_readonly_cmd(cmd: &[u8]) -> bool {
matches!(
cmd,
b"BITCOUNT"
b"ACL CAT"
| b"ACL DELUSER"
| b"ACL DRYRUN"
| b"ACL GENPASS"
| b"ACL GETUSER"
| b"ACL HELP"
| b"ACL LIST"
| b"ACL LOAD"
| b"ACL LOG"
| b"ACL SAVE"
| b"ACL SETUSER"
| b"ACL USERS"
| b"ACL WHOAMI"
| b"AUTH"
| b"BGREWRITEAOF"
| b"BGSAVE"
| b"BITCOUNT"
| b"BITFIELD_RO"
| b"BITPOS"
| b"CLIENT ID"
Expand Down Expand Up @@ -923,6 +939,7 @@ pub fn is_readonly_cmd(cmd: &[u8]) -> bool {
| b"CONFIG SET"
| b"DBSIZE"
| b"DUMP"
| b"ECHO"
| b"EVAL_RO"
| b"EVALSHA_RO"
| b"EXISTS"
Expand Down

0 comments on commit de7892c

Please sign in to comment.