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

Redis flushdb #617

Merged
merged 3 commits into from
Sep 25, 2024
Merged

Redis flushdb #617

merged 3 commits into from
Sep 25, 2024

Conversation

john-westcott-iv
Copy link
Member

2 commits in here:

  1. Simplifying how exceptions are handled with a raised translated message. This allows us to catch other exceptions we weren't expecting and exiting with clean errors.
  2. Overriding the flushdb method. Currently, in our version of Redis, the flushdb command does not respect ACLs. So when gateway switches from the fallback cache to the primary cache it calls cache.clear() this eventually does a flushdb command. The flushdb command will not check the connected users to see if they have access to keys, it just obliterates everything in the Redis DB. This causes issues in a shared Redis installation. This new method is less efficient but will load all of the keys and then attempt to delete them all and just ignores a NoPermissionError if it tried to delete something it didn't have access to.

Copy link

sonarcloud bot commented Sep 25, 2024

Copy link
Contributor

@bhavenst bhavenst left a comment

Choose a reason for hiding this comment

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

Looks good! I don't see anything to comment on. Ran all the unit tests as well with no issues locally.

@mabashian mabashian merged commit 71b0aa1 into ansible:devel Sep 25, 2024
11 checks passed
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.

4 participants