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

use LUA to increase and expire keys safely #15

Closed
wants to merge 2 commits into from

Conversation

tbarbugli
Copy link
Contributor

fixes #14

@tbarbugli
Copy link
Contributor Author

any chance to see this merged or addressed? the bug addressed here is quite critical as the rate limiter can "leak" keys and give false positive until the key is manually evicted.

@tbarbugli
Copy link
Contributor Author

More information about this. I am now tracking how many keys are in redis without a set TTL.

redis-cli -h ip.address.of.redis -n 8 info | grep db8 | awk 'BEGIN { FPAT="[0-9]+"} { if ($2 != $3) { print "some keys in Redis rate limiter have no TTL"; exit 1 } }'

I am running this every couple of minutes and I see the script "failing" once or twice a day. As I said before this is a big issue.

@thestick613
Copy link

Fork this library into your own namespace and install it on your environment like this
pip install git+https://github.com/tbarbugli/limits.git

@tbarbugli
Copy link
Contributor Author

@thestick613 I know how to install packages from git. I rather see bugs getting fixed on the upstream library and stick with that ;)

@alisaifee
Copy link
Owner

@tbarbugli sorry for the delay. could you rebase your branch? Also, why the forced version?

@tbarbugli
Copy link
Contributor Author

I created a new PR without merge conflicts #16

@alisaifee alisaifee closed this Oct 26, 2016
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.

redis hit has a race condition
3 participants