Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

flush-commands-docs #872

wants to merge 2 commits into from

Conversation

LiorKogan
Copy link
Member

@LiorKogan LiorKogan commented Nov 13, 2024

Added notes: FLUSHDB and FLUSHALL are identical on a Redis cluster.

(following https://redis.slack.com/archives/CLZCLHWQ0/p1731468610504539)

Copy link
Contributor

github-actions bot commented Nov 13, 2024

dwdougherty
dwdougherty previously approved these changes Nov 13, 2024
Copy link
Collaborator

@dwdougherty dwdougherty left a 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.
Copy link
Member

@oranagra oranagra Nov 13, 2024

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.

Copy link
Member

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. 😜

Copy link
Member Author

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.

Copy link
Member

@oranagra oranagra Nov 13, 2024

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.

@dwdougherty dwdougherty dismissed their stale review November 13, 2024 15:56

New content wasn't correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants