summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/sort_ro.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:19:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:20:07 +0000
commitdd874ab02db04853d4b5952712ab34693f9a93de (patch)
tree4b4e05d004da14862aa1680cf761476fa2b4a05c /iredis/data/commands/sort_ro.md
parentReleasing debian version 1.12.1-1. (diff)
downloadiredis-dd874ab02db04853d4b5952712ab34693f9a93de.tar.xz
iredis-dd874ab02db04853d4b5952712ab34693f9a93de.zip
Merging upstream version 1.13.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/sort_ro.md')
-rw-r--r--iredis/data/commands/sort_ro.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/iredis/data/commands/sort_ro.md b/iredis/data/commands/sort_ro.md
new file mode 100644
index 0000000..66223a3
--- /dev/null
+++ b/iredis/data/commands/sort_ro.md
@@ -0,0 +1,17 @@
+Read-only variant of the `SORT` command. It is exactly like the original `SORT` but refuses the `STORE` option and can safely be used in read-only replicas.
+
+Since the original `SORT` has a `STORE` option 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).
+
+The `SORT_RO` variant was introduced in order to allow `SORT` behavior in read-only replicas without breaking compatibility on command flags.
+
+See original `SORT` for more details.
+
+@examples
+
+```
+SORT_RO mylist BY weight_*->fieldname GET object_*->fieldname
+```
+
+@return
+
+@array-reply: a list of sorted elements.