redis / redis-io

Application running http://redis.io

Home Page:http://redis.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FLUSHALL and FLUSHDB documentation should clarify async operation.

milescrawford opened this issue · comments

A question has come up several times - what are the concurrency implications of the ASYNC modifier for FLUSHALL/FLUSHDB?

Specifically, are keys inserted after the FLUSH* ASYNC command candidates for removal? Or does the async thread only remove keys that existed at the time the flush command was executed?

A quick sentence or two on this topic on these pages would suffice:
https://redis.io/commands/flushall
https://redis.io/commands/flushdb

Hello @milescrawford

The latter, only keys that existed before the command's execution will be flushed. Please feel free to open a new Pull Request with the suggested clarification that fixes this issue.

As a follow-up question, I'm wondering, what the behaviour is for keys that are updated after executing an async flush command. Is there a chance the updated key/value will be flushed?