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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/commands/flushall/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dwdougherty I suggest adding this to FLUSHALL based on Oran's input.


## Behavior change history

Expand Down
1 change: 1 addition & 0 deletions content/commands/flushdb/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ It is possible to use one of the following modifiers to dictate the flushing mod

* An asynchronous `FLUSHDB` 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 `FLUSHALL` since a Redis Cluster supports only database zero.

## Behavior change history

Expand Down
Loading