Skip to content

Conversation

@galvana
Copy link
Contributor

@galvana galvana commented Dec 17, 2025

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

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

@galvana galvana requested a review from a team as a code owner December 17, 2025 00:17
@galvana galvana requested review from johnewart and removed request for a team December 17, 2025 00:17
@vercel
Copy link

vercel bot commented Dec 17, 2025

Deployment failed with the following error:

You must set up Two-Factor Authentication before accessing this team.

View Documentation: https://vercel.com/docs/two-factor-authentication

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 17, 2025

Greptile Overview

Greptile Summary

Reverts 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.

  • Changed api_async_engine_pool_size from 50 → 5
  • Changed api_async_engine_max_overflow from 50 → 10

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

  • This PR is safe to merge with low risk - it's a simple configuration revert
  • Score reflects the straightforward nature of reverting pool size configuration values. The change only modifies two numeric default values and has no logic changes. Minor concern about the lack of CHANGELOG entry and the asymmetry with sync pool settings, but these are non-blocking.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
src/fides/config/database_settings.py 4/5 Reverted async connection pool settings from 50/50 back to 5/10 (original SQLAlchemy defaults) to prevent sudden spike in database connections

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

Edit Code Review Agent Settings | Greptile

Comment on lines 53 to 60
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.",
)
Copy link
Contributor

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
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.30%. Comparing base (7108d26) to head (6f56d6d).
⚠️ Report is 5 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@johnewart johnewart left a comment

Choose a reason for hiding this comment

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

LGTM

@johnewart johnewart enabled auto-merge December 17, 2025 00:45
@johnewart johnewart added this pull request to the merge queue Dec 17, 2025
Merged via the queue into main with commit 27068af Dec 17, 2025
66 of 68 checks passed
@johnewart johnewart deleted the reset-async-connection-pool-size branch December 17, 2025 01:27
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.

3 participants