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 healthcheck lock #185

Merged
merged 5 commits into from
Jan 18, 2021
Merged

Redis healthcheck lock #185

merged 5 commits into from
Jan 18, 2021

Conversation

thomasleese
Copy link
Contributor

@thomasleese thomasleese commented Jan 18, 2021

This builds on top of #183 and fixes a potential race condition. See commits for more details.

Thanks to @kevindew for pointing out the issue.

This matches the naming scheme we've got for the other connectivity
healthchecks, such as `database_connectivity`.
In the Redis healthcheck we write and read to a key, so we should check
it's doing that to the key we want it to. This also opens up the
potential for having different keys.
At the moment we use the same key for our healthcheck. This poses a
potential race condition problem as we share the Redis database across
all our applications.

Instead we can generate a random key for each request which should
prevent this problem from happening.
This relates to the race condition problem we've fixed in
cfb60c6.
I think the previous version should have been 2.9.0 as it introduced a
new feature, but I think bumping this bug fix to 2.9.0 would be
confusing.
@thomasleese thomasleese merged commit b911c5b into master Jan 18, 2021
@thomasleese thomasleese deleted the redis-healthcheck-lock branch January 18, 2021 11:27
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.

2 participants