-
Notifications
You must be signed in to change notification settings - Fork 38
Improve reconnection settings #74
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
Improve reconnection settings #74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep it as an Option? As we have generalized maxAttempts, just a lazy val would be sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. I'll make those changes.
|
I've made those changes, but I'm having a difficult time creating reliable tests since there is no access to the client's address. It would be much easier if RedisConnection captured the Connected() message but I don't want to introduce complexity just so our tests pass. How should I proceed on this? |
|
Alright, I discovered named clients, which is perfect for our reconnection tests. When implementing this I found a bug in CLIENT SETNAME, which is fixed in this branch as well. This allowed me to reliably kill the connection I wanted and test non-reconnection and reconnections properly. Is there any more I can do to improve this before merge, or does this fit the bill? |
|
Thanks a lot .. I will try to do a quick browse tonight and let u know .. |
|
Looks good to me .. @guersam - any showstopper for release ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to make it public? I'm a bit afraid of having global mutable state which can be accessed anywhere, even though it's not a part of user-facing interface.
|
All the others look good to me, thanks a lot! |
|
cool .. I will merge tomorrow and cut a release ver 0.5 ... Thanks for all the hard work. |
|
No, that was a mistake from when I was testing earlier. I've made it private again. I'm glad to help. |
|
Looks like I will get some bandwidth only over the weekend. Things are awfully crazy at work :-( .. Is it too much of a delay if I make the release over the weekend ? Apologies, apologies .. |
|
This weekend would work well, thanks. |
Improve reconnection settings
|
Merged and released 0.5. Thanks to all for the help. |
I've added support for maximum retries and updated the tests. Additionally, RedisSpecBase was updated to use the Akka TestKit. The ExponentialReconnectionSettings have been updated and fixed (they would overflow previously).
I'd still like a test for maximum retries but I'm haven't been able to find a solution.
I look forward to your feedback.