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

Use CPU based limit and Blocking Connection Pool in redis-py by default #3200

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dvora-h
Copy link
Collaborator

@dvora-h dvora-h commented Apr 8, 2024

Pull Request check-list

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

  • Do tests and lints pass with this change?
  • 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

Please provide a description of the change here.

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 21 lines in your changes are missing coverage. Please review.

Project coverage is 91.81%. Comparing base (2f88840) to head (20c0721).
Report is 20 commits behind head on master.

Files Patch % Lines
redis/connection.py 38.23% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3200      +/-   ##
==========================================
- Coverage   91.84%   91.81%   -0.04%     
==========================================
  Files         128      128              
  Lines       33232    33354     +122     
==========================================
+ Hits        30523    30625     +102     
- Misses       2709     2729      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dvora-h dvora-h added the breakingchange API or Breaking Change label Apr 10, 2024
@dvora-h dvora-h marked this pull request as ready for review April 10, 2024 14:49
Copy link
Contributor

@gerzse gerzse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see three different things in this PR:

  • Switch to BlockingConnection
  • Limit the number of connections to 2 * CPU_COUNT, by default
  • Some new methods added related to caching

The first two changes seem pretty relevant to me, so that they deserve explanations in the commit messages: why were they done, what triggered them, etc.

@@ -2859,11 +2859,13 @@ async def test_readonly_pipeline_from_readonly_client(

async def test_can_run_concurrent_pipelines(self, r: RedisCluster) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the fixture from here, if initialized inside the test?

@dvora-h dvora-h marked this pull request as draft May 8, 2024 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breakingchange API or Breaking Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants