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

Reuse the old nodes' connections when a cluster topology refresh is being done #2235

Merged
merged 6 commits into from
Jun 23, 2022

Conversation

barshaul
Copy link
Contributor

@barshaul barshaul commented Jun 16, 2022

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Current RedisCluster behavior creates new connections to every node when the cluster topology is refreshed.
A fix was made to reuse the old nodes' connections if they are healthy during a cluster topology refresh to reduce connection storms.

@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2022

Codecov Report

Merging #2235 (1bac843) into master (bedf3c8) will increase coverage by 0.00%.
The diff coverage is 93.47%.

@@           Coverage Diff           @@
##           master    #2235   +/-   ##
=======================================
  Coverage   91.83%   91.83%           
=======================================
  Files         108      108           
  Lines       27690    27723   +33     
=======================================
+ Hits        25429    25460   +31     
- Misses       2261     2263    +2     
Impacted Files Coverage Δ
tests/test_asyncio/test_cluster.py 97.44% <57.14%> (-0.21%) ⬇️
redis/cluster.py 90.30% <100.00%> (+0.30%) ⬆️
tests/test_cluster.py 96.83% <100.00%> (-0.08%) ⬇️
redis/asyncio/connection.py 83.85% <0.00%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bedf3c8...1bac843. Read the comment docs.

@barshaul barshaul marked this pull request as ready for review June 16, 2022 09:07
@dvora-h dvora-h added maintenance Maintenance (CI, Releases, etc) cluster labels Jun 23, 2022
@dvora-h dvora-h merged commit 6da8086 into redis:master Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cluster maintenance Maintenance (CI, Releases, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants