-
Notifications
You must be signed in to change notification settings - Fork 84
Resetting async connection pool size #7140
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
Conversation
|
Deployment failed with the following error: View Documentation: https://vercel.com/docs/two-factor-authentication |
Greptile OverviewGreptile SummaryReverts async database connection pool settings from 50/50 back to 5/10 (SQLAlchemy defaults) to prevent sudden connection spikes. The previous increase to 50/50 was added just 5 days ago in PR #7126, and this revert suggests it may have caused database connection issues in production or testing.
The change creates an asymmetry with the sync engine pool settings (which remain at 50/50), though this may be intentional if async operations have different resource requirements. Confidence Score: 4/5
Important Files ChangedFile Analysis
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
| api_async_engine_pool_size: int = Field( | ||
| default=50, | ||
| default=5, | ||
| description="Number of concurrent database connections Fides will use for async API requests. Note that the pool begins with no connections, but as they are requested the connections are maintained and reused up to this limit.", | ||
| ) | ||
| api_async_engine_max_overflow: int = Field( | ||
| default=50, | ||
| default=10, | ||
| description="Number of additional 'overflow' concurrent database connections Fides will use for async API requests if the pool reaches the limit. These overflow connections are discarded afterwards and not maintained.", | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Creates inconsistency between async (5/10) and sync (50/50) pool configurations
The sync API engine (api_engine_pool_size/api_engine_max_overflow on lines 27-34) uses 50/50, while async now uses 5/10. This asymmetry could cause confusing performance characteristics where async operations are throttled while sync operations are not.
Consider documenting why async needs different (lower) pool settings than sync, or align them to the same values if there's no technical reason for the difference.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7140 +/- ##
==========================================
- Coverage 87.30% 87.30% -0.01%
==========================================
Files 533 533
Lines 35090 35090
Branches 4067 4067
==========================================
- Hits 30635 30634 -1
Misses 3570 3570
- Partials 885 886 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
johnewart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description Of Changes
Resetting async connection pool size to prevent a sudden jump in connections. Using the default values of 5 pooled connections and 10 overflow connections.
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works