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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
extend_life interprets TTL as seconds rather than milliseconds (0.1.8, fixed on master) #44
Comments
Suggestion : we could have tests relying on some range of the pttl value to avoid regressions on that! |
One last note: while doing those tests I also noticed that extend life will actually reset the TTL (but not increase it). This could also be tested and added to the documentation as well (since it wasn't clear at all if the extension would add to the existing TTL, rather than replace it). Just a thought! |
@thbar You're right. Good catch. In 0.1.8 the script still uses the Redis @leandromoreira What do you think? The version on master could break clients "relying" on this behaviour of @thbar Would you be willing to write those specs? Also you're right that the README could be more explicit about what |
Thanks @thbar great catch!
Yes 馃憤 |
@maltoe I'll be writing those specs, and maybe ask a few questions in the PR (ex: |
This is all fixed and we have TTL specs |
I'm rather new with redlock-rb so bear with me 馃槃
While doing extensive tests I think I stumbled upon a bug on version 0.1.8 (I'm using redis 3.0.7 and ruby 2.2.3 on that specific test).
I believe when
extend_life: true
is passed, 0.1.8 interprets the TTL value as seconds, rather than milliseconds. Master (commit 7d9c91a) will interpret the value as milliseconds (as I'd have expected).I'm running this:
Output on 0.1.8
Output on master
The text was updated successfully, but these errors were encountered: