ASKING

Since 1.1.0ClusterChanged in 1.2.1

Syntax

ASKING
  • Flags: fast
  • ACL categories: @connection, @fast
  • Arity: 1

History

  • 1.2.1: acl categories: added connection; removed cluster

Lets the connection's next command use a slot this node is importing (CLUSTER SETSLOT ... IMPORTING) but does not own yet. A cluster client sends it before retrying a command answered with ASK. It applies to one command only.

On a server that is not a cluster node it is refused with ERR This instance has cluster support disabled, as in Redis, since 1.2.1; before, it answered OK.

Examples

> SET k 1
(error) MOVED 7629 127.0.0.1:17652
> ASKING
OK
> SET k 1
OK
> GET k
(error) MOVED 7629 127.0.0.1:17652