WAITAOF

Since 1.1.0ServerKnown issue

Syntax

WAITAOF numlocal numreplicas timeout
  • Flags: blocking
  • ACL categories: @blocking, @generic, @keyspace, @read, @slow
  • Arity: 4

Waits until every write this connection made before it is in the local AOF and fsynced (numlocal), and in numreplicas replicas' AOFs, or timeout milliseconds pass.

Reply

  • An array: the number of local fsyncs, 0 or 1, and the number of replicas.

Known issue

With the AOF off, WAITAOF replies that the local fsync happened, [1, 0]; Redis refuses numlocal without an AOF. Do not rely on WAITAOF for durability unless appendonly is yes. Filed as kividb#137, fixed in 1.2.