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

Implement connection pooling #908

Merged
merged 29 commits into from
Nov 2, 2023
Merged

Conversation

DanPaseltiner
Copy link
Collaborator

@DanPaseltiner DanPaseltiner commented Nov 2, 2023

PULL REQUEST

Summary

This PR introduces connection pooling in the MPI. This required making the following changes:

  1. The DAL and MPI expose the pool_size and max_overflow sqlalchemy parameters
  2. link_record_against_mpi expects the connection client to be passed in as a parameter allowing a single connection pool to be utilized for multiple linkage requests

Related Issue

Fixes #CDCgov/phdi-azure#326

Checklist

  • If this code affects the other scrum team, have they been notified? (In Slack, as reviewers, etc.)

Copy link
Collaborator

@m-goggins m-goggins left a comment

Choose a reason for hiding this comment

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

Looks good! I'm glad you found a way to make the testing easier

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Merging #908 (68b8b63) into main (ed4eeae) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #908      +/-   ##
==========================================
- Coverage   96.38%   96.38%   -0.01%     
==========================================
  Files          48       48              
  Lines        2821     2820       -1     
==========================================
- Hits         2719     2718       -1     
  Misses        102      102              
Flag Coverage Δ
unit-tests 96.38% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
phdi/linkage/dal.py 97.08% <100.00%> (ø)
phdi/linkage/link.py 97.11% <100.00%> (ø)
phdi/linkage/mpi.py 96.11% <100.00%> (-0.03%) ⬇️

@DanPaseltiner DanPaseltiner merged commit c4b5712 into main Nov 2, 2023
20 checks passed
@DanPaseltiner DanPaseltiner deleted the implement-connection-pooling branch November 2, 2023 16:14
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.

2 participants