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

Close connection when _fill_free_pool is cancelled. #893

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

Conversation

iksteen
Copy link

@iksteen iksteen commented Sep 30, 2022

Cancelling _fill_free_pool before a new connection is added to self._free prevents it from being cleaned up which causes a lingering connection and eventually the postgresql server running out of sockets.

What do these changes do?

Are there changes in behavior for the user?

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> (e.g. 588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the PR
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.

Cancelling _fill_free_pool before a new connection is added to
self._free prevents it from being cleaned up which causes a
lingering connection and eventually the postgresql server running
out of sockets.
@codecov
Copy link

codecov bot commented Oct 6, 2022

Codecov Report

Merging #893 (1f39c7c) into master (1ba66ca) will decrease coverage by 0.93%.
The diff coverage is 20.00%.

@@            Coverage Diff             @@
##           master     #893      +/-   ##
==========================================
- Coverage   91.77%   90.83%   -0.94%     
==========================================
  Files           9        9              
  Lines         863      873      +10     
  Branches      118      121       +3     
==========================================
+ Hits          792      793       +1     
- Misses         53       61       +8     
- Partials       18       19       +1     
Impacted Files Coverage Δ
aiopg/pool.py 91.02% <20.00%> (-3.45%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant