Skip to main content

WAITAOF

Note

Official reference: WAITAOF.

Wait for preceding writes to reach local or replica AOF persistence.

Syntax​

WAITAOF numlocal replicas timeout

Requires Redis 7.2+. numlocal is 0 or 1, replicas is the target replica count, and timeout is in milliseconds. Local persistence requires AOF. Returned counts report completion and do not roll back preceding writes.

Results​

ReturnRowsContent
ResultSet1LOCAL field, LONG type
REPLICAS field, LONG type

Example​

SET demo:message hello
WAITAOF 1 0 1000