Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Missing ClusterPipeline Lock #2190

Merged
merged 6 commits into from
May 30, 2022
Merged

Conversation

grippy
Copy link
Contributor

@grippy grippy commented May 19, 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?

Description of change

This fixes this issue: #2189

A MOVED response from a cluster pipeline command might fail to initialize a new connection if the node hasn't been seen before. This causes a failure because ClusterPipeline never initializes its RedisCluster base class. Because of this we get an AttributeError while trying to use the _lock in the RedisCluster.get_redis_connection call.

@grippy grippy marked this pull request as ready for review May 20, 2022 18:05
@codecov-commenter
Copy link

codecov-commenter commented May 23, 2022

Codecov Report

Merging #2190 (8b0f065) into master (9167a0e) will increase coverage by 12.64%.
The diff coverage is 66.66%.

@@             Coverage Diff             @@
##           master    #2190       +/-   ##
===========================================
+ Coverage   79.35%   91.99%   +12.64%     
===========================================
  Files         108      108               
  Lines       27372    27376        +4     
===========================================
+ Hits        21720    25185     +3465     
+ Misses       5652     2191     -3461     
Impacted Files Coverage Δ
redis/commands/json/__init__.py 97.56% <ø> (ø)
redis/commands/timeseries/__init__.py 94.73% <ø> (ø)
redis/cluster.py 90.33% <66.66%> (+68.41%) ⬆️
tests/test_graph.py 90.68% <0.00%> (+0.03%) ⬆️
redis/commands/core.py 82.99% <0.00%> (+0.16%) ⬆️
redis/connection.py 86.36% <0.00%> (+0.47%) ⬆️
redis/client.py 88.76% <0.00%> (+0.76%) ⬆️
redis/commands/parser.py 67.77% <0.00%> (+1.11%) ⬆️
redis/asyncio/connection.py 83.85% <0.00%> (+1.68%) ⬆️
tests/test_scripting.py 93.67% <0.00%> (+3.16%) ⬆️
... and 11 more

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 9167a0e...8b0f065. Read the comment docs.

@dvora-h dvora-h merged commit 4807908 into redis:master May 30, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants