-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flush-commands-docs #872
base: main
Are you sure you want to change the base?
flush-commands-docs #872
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -66,6 +66,7 @@ It is possible to use one of the following modifiers to dictate the flushing mod | |||
|
|||
* An asynchronous `FLUSHALL` command only deletes keys that were present at the time the command was invoked. Keys created during an asynchronous flush will be unaffected. | |||
* This command does not delete functions. | |||
* When using Redis Cluster, this command is identical to `FLUSHDB` since a Redis Cluster supports only database zero. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's actually incorrect.
FLUSHALL has some side effects that FLUSHDB does not, and currently even on a single db deployment these still hold.
for instance, FLUSHALL saves an empty RDB file and resets the dirty counter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not certain if we want to fix it and change the behavior of FLUSHDB on a single-db deployments, or document that. but for sure we should avoid stating wrong facts. 😜
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We definitely want to document the current behavior, including all side effects. Otherwise, people would have false assumptions. Oran, please suggest an edit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like that:?
Other than emptying all databases (similar to FLUSHDB), this command can also clear the persistence RDB file,
it aborts any snapshot that's in progress, and if the `save` config is enabled, it saves an empty RDB file.
Added notes:
FLUSHDB
andFLUSHALL
are identical on a Redis cluster.(following https://redis.slack.com/archives/CLZCLHWQ0/p1731468610504539)