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

Remove clean up on extend fail #151

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Conversation

palcalde
Copy link
Contributor

@palcalde palcalde commented Feb 21, 2024

Hello!

This is a fix for #149. I realized the clean up I added is removing keys in all redises if just one of the redises fail to extend (for example with a network error). This means in case of a single redis error we'll release a previously held lock even if we were able to extend in a quorum redises fine.

I can add the release after the actOnPoolAsync, however, the complexity in the code is not worth the benefit. So I just removed the code that released locks in case of errors. Locks will anyway be released after TTL expires.

Let me know if this makes sense.

Thanks!

@palcalde palcalde mentioned this pull request Feb 21, 2024
@hjr265 hjr265 merged commit 1bac91c into go-redsync:master Feb 21, 2024
@palcalde palcalde deleted the pablo/fix-extend branch February 21, 2024 22:39
@hjr265
Copy link
Member

hjr265 commented Feb 22, 2024

@palcalde Thank you!

I am sorry, I thought I had hit the "Comment" button after merging. But it didn't go through for some reason.

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