-
Notifications
You must be signed in to change notification settings - Fork 14
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
Import some changes from redis-py #70
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #70 +/- ##
==========================================
+ Coverage 75.05% 75.12% +0.06%
==========================================
Files 132 132
Lines 34378 34405 +27
==========================================
+ Hits 25803 25847 +44
+ Misses 8575 8558 -17 ☔ View full report in Codecov by Sentry. |
a205974
to
bb8ff56
Compare
* Fixes CAE-333, which uncovered that the init method of the base class did override the initialization of the socket_timeout parameter. * Added missing blank lines * Removed blank line * Changed to quotes --------- Co-authored-by: vladvildanov <divinez122@outlook.com> Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
Add missing type hints in the retry.py file and related tests. Co-authored-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io> Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
For asyncio connection errors, include the details in the error message, instead of only including the error code. Co-authored-by: dmitry.kanev <dmitry.kanev@dualbootpartners.com> Co-authored-by: Gabriel Erzse <gabriel.erzse@redis.com> Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
Connection errors are formatted in four places, sync and async, network socket and unix socket. Each place has some small differences compared to the others, while they could be, and should be, formatted in an uniform way. Factor out the logic in a helper method and call that method in all four places. Arguably we lose some specificity, e.g. the words "unix socket" won't be there anymore, but it is more valuable to not have code duplication. Co-authored-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io> Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
This change was originally part of redis-py's d1b4191f7a Co-authored-by: Gabriel Erzse <gabriel.erzse@redis.com> Co-authored-by: Chayim <chayim@users.noreply.github.com> Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
Make sure Unix sockets get closed if the connection fails. Co-authored-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io> Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
Speed up the computation for slots when initializing a cluster. After profiling, this turned out to be very slow, when it does not have to be. It does not make sense to recompute the same thing over and over in a loop. This change was originally part of redis-py's d1b4191f7a Co-authored-by: Gabriel Erzse <gabriel.erzse@redis.com> Co-authored-by: Chayim <chayim@users.noreply.github.com> Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
Not sure how it worked before, but it looks like it did not match exactly the format in the server INFO response, i.e. MMmmPP. This change was originally part of redis-py's d1b4191f7a Co-authored-by: Gabriel Erzse <gabriel.erzse@redis.com> Co-authored-by: Chayim <chayim@users.noreply.github.com> Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
This change was originally part of redis-py's d1b4191f7a Co-authored-by: Gabriel Erzse <gabriel.erzse@redis.com> Co-authored-by: Chayim <chayim@users.noreply.github.com> Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
Handle more cases of failure when initializing SSL sockets, and make sure no socket is left unclosed in case of errors. Co-authored-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io> Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
This change was originally part of redis-py's d1b4191f7a Co-authored-by: Gabriel Erzse <gabriel.erzse@redis.com> Co-authored-by: Chayim <chayim@users.noreply.github.com> Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
Get rid of some warning related to documentation. Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
I added the Co-authored-by tag because those commits aren't copied verbatim. There are some minor changes in the code or the commit message compared to the original. |
bb8ff56
to
30cc14c
Compare
Thanks, now I understand :) Just was wondering whether this was intentional |
Description of change
retry.py