READWRITE
READWRITE
- Group
- Cluster
- Complexity
- O(1)
- Arity
- 1 (exactly, counting the command name)
- Flags
- fast
- HotKV Cloud
- All plans
- On-Premise
- no license needed
READWRITE undoes READONLY for the current
connection. Afterwards a replica answers every command on a key with -MOVED
to its primary again, which is the default for a new connection.
Return value
Section titled “Return value”Simple string OK in RESP2 and RESP3. With cluster mode off:
ERR This instance has cluster support disabled.
Examples
Section titled “Examples”10.0.0.4:6379> READONLYOK10.0.0.4:6379> GET user:1000"alice"10.0.0.4:6379> READWRITEOK10.0.0.4:6379> GET user:1000(error) MOVED 1649 10.0.0.1:6379Compatibility
Section titled “Compatibility”Same as Redis 7 and Valkey 8.
See also
Section titled “See also”In a cluster: Keys, slots and commands in a cluster
Was this page helpful?
Thanks for the feedback.