Skip to content

Commit

Permalink
fix(docs): organize cluster mode part of lua scripting (#3073)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwang44 authored and vladvildanov committed Sep 27, 2024
1 parent 5a0a8a5 commit f1bde7e
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions docs/lua_scripting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,24 @@ Cluster Mode

Cluster mode has limited support for lua scripting.

The following commands are supported, with caveats: - ``EVAL`` and
``EVALSHA``: The command is sent to the relevant node, depending on the
keys (i.e., in ``EVAL "<script>" num_keys key_1 ... key_n ...``). The
keys *must* all be on the same node. If the script requires 0 keys, *the
command is sent to a random (primary) node*. - ``SCRIPT EXISTS``: The
command is sent to all primaries. The result is a list of booleans
corresponding to the input SHA hashes. Each boolean is an AND of “does
the script exist on each node?”. In other words, each boolean is True
iff the script exists on all nodes. - ``SCRIPT FLUSH``: The command is
sent to all primaries. The result is a bool AND over all nodes’
responses. - ``SCRIPT LOAD``: The command is sent to all primaries. The
result is the SHA1 digest.

The following commands are not supported: - ``EVAL_RO`` - ``EVALSHA_RO``
The following commands are supported, with caveats:

- ``EVAL`` and ``EVALSHA``: The command is sent to the relevant node,
depending on the keys (i.e., in ``EVAL "<script>" num_keys key_1 ...
key_n ...``). The keys *must* all be on the same node. If the script
requires 0 keys, *the command is sent to a random (primary) node*.
- ``SCRIPT EXISTS``: The command is sent to all primaries. The result
is a list of booleans corresponding to the input SHA hashes. Each
boolean is an AND of “does the script exist on each node?”. In other
words, each boolean is True iff the script exists on all nodes.
- ``SCRIPT FLUSH``: The command is sent to all primaries. The result
is a bool AND over all nodes’ responses.
- ``SCRIPT LOAD``: The command is sent to all primaries. The result
is the SHA1 digest.

The following commands are not supported:

- ``EVAL_RO``
- ``EVALSHA_RO``

Using scripting within pipelines in cluster mode is **not supported**.

0 comments on commit f1bde7e

Please sign in to comment.