Enables read-write queries for a connection to a Valkey replica node.
READWRITE
Disables read queries for a connection to a Valkey replica node.
Read queries against a Valkey Cluster replica node are disabled by default.
For standalone replica nodes, since Valkey 8.0, read queries are also
disabled for clients that have executed the
CLIENT CAPA redirect
command.
But you can use the READONLY
command to change this
behavior on a per- connection basis. The READWRITE
command
resets the readonly mode flag of a connection back to readwrite.
Simple string
reply: OK
.
O(1)
@connection @fast
ASKING, CLUSTER, CLUSTER ADDSLOTS, CLUSTER ADDSLOTSRANGE, CLUSTER BUMPEPOCH, CLUSTER COUNT-FAILURE-REPORTS, CLUSTER COUNTKEYSINSLOT, CLUSTER DELSLOTS, CLUSTER DELSLOTSRANGE, CLUSTER FAILOVER, CLUSTER FLUSHSLOTS, CLUSTER FORGET, CLUSTER GETKEYSINSLOT, CLUSTER HELP, CLUSTER INFO, CLUSTER KEYSLOT, CLUSTER LINKS, CLUSTER MEET, CLUSTER MYID, CLUSTER MYSHARDID, CLUSTER NODES, CLUSTER REPLICAS, CLUSTER REPLICATE, CLUSTER RESET, CLUSTER SAVECONFIG, CLUSTER SET-CONFIG-EPOCH, CLUSTER SETSLOT, CLUSTER SHARDS, CLUSTER SLOT-STATS, CLUSTER SLOTS, READONLY.