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

Unlock all servers if lock could not be acquired. #5

Closed
wants to merge 1 commit into from

Conversation

maltoe
Copy link
Collaborator

@maltoe maltoe commented Mar 25, 2015

This reverts my change to only unlock servers that reported successful SETNX commands, as indicated in the algorithm description.

antirez/redlock-rb#3

In case a SETNX command was indeed received by a Redis server but the
response did not make it through, we should still try to unlock it in
case the quorum can not be reached or TTL is up.

See:
antirez/redlock-rb#3
@maltoe
Copy link
Collaborator Author

maltoe commented Mar 25, 2015

About the remaining questions in the issue above: Not sure if we want to go that way. Aborting in case the TTL is used up (>= (LOCK_TTL - A_FEW_MS)) or maybe even if the quorum can not be reached anymore sounds like a good idea, but also adds a bit of complexity, of which I'm not sure if it's worth it.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling e64c3cc on unlock-all-servers into 26de0ab on master.

@leandromoreira
Copy link
Owner

Cool @maltoe, I think we should avoid complexity right now. Btw what's your rubygem user?

@antirez asked you to link the redlock-rb to Redlock page, I'm 100% agree with that. 🍰

"@maltoe I see you are contributing to a fork of this lib, I guess what you are developing is more an usable lib compared to my proof of concept, right? Is it a good idea to link it from the Redlock page? Thanks."

@maltoe
Copy link
Collaborator Author

maltoe commented Mar 25, 2015

@leandromoreira rubygem user is 'maltoe', but most of my ruby work is under 'flavoursys'

@leandromoreira
Copy link
Owner

@maltoe looking at http://guides.rubygems.org/command-reference/#gem-owner how to add a gem owner I saw that in fact I need your email.

@maltoe
Copy link
Collaborator Author

maltoe commented Mar 25, 2015

malte dot rohde at flavoursys dot com should work

@maltoe
Copy link
Collaborator Author

maltoe commented Mar 25, 2015

@leandromoreira Btw, if you're ok with the merge requests of today, I'm going to just put them on top of master to avoid pointless merge commits

@leandromoreira
Copy link
Owner

@maltoe go ahead, and if you want you can also bump up version, I already added you as gem owner.

@maltoe maltoe closed this Mar 25, 2015
@maltoe maltoe deleted the unlock-all-servers branch March 25, 2015 17:31
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

3 participants