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 Monitor to make sure we call RedisClient in a thread safe way. #143

Merged
merged 3 commits into from
Aug 20, 2023

Conversation

dhruvCW
Copy link
Contributor

@dhruvCW dhruvCW commented Aug 19, 2023

  • Use Monitor whenever we call RedisClient. This is required since RedisClient is not thread safe, thus we should do what [redis-rb](https://github.com/redis/redis-rb/blob/master/lib/redis.rb#L161) does 🙂

  • Derived LockAcquisitionError from LockError. This just makes sense IMO to keep LockError as the base error type for this library.

  • Add documentation for how to use RedLock with sentinel configuration.

`RedisClient` is not thread safe. Thus we should do what `redis-rb`
does and use a `Monitor` when calling the `client`.
it just makes sense IMO to use `LockError` as a base error type.
@leandromoreira leandromoreira merged commit b299f34 into leandromoreira:main Aug 20, 2023
7 checks passed
@leandromoreira
Copy link
Owner

Thank you @dhruvCW 🚀

@dhruvCW dhruvCW deleted the use_monitor branch August 20, 2023 15:09
@dhruvCW
Copy link
Contributor Author

dhruvCW commented Aug 20, 2023

@leandromoreira could we push a patch release with these changes soon ? We need this to be able to use hiredis-client

@leandromoreira
Copy link
Owner

will do @dhruvCW

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