summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/bitfield_ro.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:19:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:19:32 +0000
commit7480e618ec785ba8a1c74c8a150cffe5880fb3bb (patch)
tree87422376dd9a7eee55850f0fce9a8bb4c13e44a2 /iredis/data/commands/bitfield_ro.md
parentAdding upstream version 1.12.1. (diff)
downloadiredis-df49d7c38b2b8498c93215691d16403b32becec8.tar.xz
iredis-df49d7c38b2b8498c93215691d16403b32becec8.zip
Adding upstream version 1.13.0.upstream/1.13.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/bitfield_ro.md')
-rw-r--r--iredis/data/commands/bitfield_ro.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/iredis/data/commands/bitfield_ro.md b/iredis/data/commands/bitfield_ro.md
new file mode 100644
index 0000000..94057a1
--- /dev/null
+++ b/iredis/data/commands/bitfield_ro.md
@@ -0,0 +1,19 @@
+Read-only variant of the `BITFIELD` command.
+It is like the original `BITFIELD` but only accepts `!GET` subcommand and can safely be used in read-only replicas.
+
+Since the original `BITFIELD` has `!SET` and `!INCRBY` options it is technically flagged as a writing command in the Redis command table.
+For this reason read-only replicas in a Redis Cluster will redirect it to the master instance even if the connection is in read-only mode (see the `READONLY` command of Redis Cluster).
+
+Since Redis 6.2, the `BITFIELD_RO` variant was introduced in order to allow `BITFIELD` behavior in read-only replicas without breaking compatibility on command flags.
+
+See original `BITFIELD` for more details.
+
+@examples
+
+```
+BITFIELD_RO hello GET i8 16
+```
+
+@return
+
+@array-reply: An array with each entry being the corresponding result of the subcommand given at the same position.