Skip to content

Add cache clear on error for inc, touch, delete_many, add #1

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

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

nessex
Copy link

@nessex nessex commented Jul 12, 2024

This adds django-elasticache's exception handling to additional cache commands.
We were seeing some commands executed in a recent incident with logs suggesting the response was for a different type of command entirely. This could have been caused by any of these commands hitting exception cases like timeouts, then the response buffer being reused despite being half-full of data from the failed request.

I'm speculating a little, and we won't necessarily be able to see the issue without the accompanying timeouts / exceptions to verify, but it seems like a safe change to make. This certainly isn't the only thread safety issue in our cache library stack though.

Note: The original author even acknowledged the problem here, but the PR stalled due to unrelated changes
gusdan#27 (comment)

Verified

This commit was signed with the committer’s verified signature.
nessex Nathan Essex
@nessex nessex self-assigned this Jul 12, 2024
@nessex nessex merged commit d22ee1d into master-kraken Jul 23, 2024
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.

None yet

2 participants