Skip to content

Fixed MovedError, and stopped iterating through startup nodes when slots are fully covered #1819

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

Merged
merged 2 commits into from
Dec 22, 2021

Conversation

barshaul
Copy link
Contributor

…ion of the nodes manager to stop iterating through startup nodes when the coverage is full

Pull Request check-list

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

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

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

Description of change

  1. Fixed 'MovedError' bug in RedisCluster: when we reinitialized the nodes topology and then continue to try to execute the command with the new caches we haven't refreshed the target_node and therefore we faced another MovedError.
  2. Changed the NodesManager initialize() function to stop iterating through startup nodes when the slots are fully covered

…on of the nodes manager to stop iterating through startup nodes when the coverage is full
@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2021

Codecov Report

Merging #1819 (21ff2b4) into master (4831034) will decrease coverage by 0.01%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1819      +/-   ##
==========================================
- Coverage   94.32%   94.30%   -0.02%     
==========================================
  Files          75       75              
  Lines       15783    15788       +5     
==========================================
+ Hits        14887    14889       +2     
- Misses        896      899       +3     
Impacted Files Coverage Δ
redis/cluster.py 90.23% <85.71%> (-0.07%) ⬇️
tests/test_cluster.py 98.67% <0.00%> (-0.13%) ⬇️

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 4831034...21ff2b4. Read the comment docs.

@barshaul barshaul marked this pull request as ready for review December 20, 2021 13:23
@chayim chayim self-requested a review December 21, 2021 07:27
@chayim chayim changed the title RedisCluster: Fixed 'MovedError' bug and stop iterating through startup nodes when slots are fully covered Fixed MovedError bug and stoped iterating through startup nodes when slots are fully covered Dec 21, 2021
@chayim chayim changed the title Fixed MovedError bug and stoped iterating through startup nodes when slots are fully covered Fixed MovedError, and stopped iterating through startup nodes when slots are fully covered Dec 22, 2021
@chayim chayim merged commit e0d3ba5 into redis:master Dec 22, 2021
@chayim chayim deleted the moved_error branch December 22, 2021 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants