Skip to content

Remove clean up on extend fail#151

Merged
hjr265 merged 1 commit intogo-redsync:masterfrom
palcalde:pablo/fix-extend
Feb 21, 2024
Merged

Remove clean up on extend fail#151
hjr265 merged 1 commit intogo-redsync:masterfrom
palcalde:pablo/fix-extend

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