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

[Improvement] Increase the default database connection pool max wait time #3427

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Marvel-Gu
Copy link

… time (#3419)

Why are the changes needed?

The default database connection pool max wait time is 1000ms for now.
This is quite small and the wait timeout exception is easy to occur when the database system is a bit busy.
Resolve #3419 .

Brief change log

Change the default value of DB_CONNECT_MAX_WAIT_MILLIS to 30000 in AmoroManagementConf.java(amo-ams).
Change the default value of connection-pool-max-wait-millis to 30000 in amoro-configmap.yaml(charts) and config.yaml(dist).
The reason for choosing 30000 instead of 5000 is that the default connectionTimeout value of HikariCP is 30000 milliseconds (the default value of max-wait-millis of DBCP2 is -1), and the default values ​​of mainstream database connection pools are almost 30000ms or larger.

Documentation

Does this pull request introduce a new feature?
No

@Marvel-Gu Marvel-Gu changed the title [Improvement] Increase the default database connection pool max wait time (#3419) [Improvement] Increase the default database connection pool max wait time Jan 25, 2025
Copy link
Contributor

@huyuanfeng2018 huyuanfeng2018 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the contribution! LGTM.

Copy link
Contributor

@huyuanfeng2018 huyuanfeng2018 left a comment

Choose a reason for hiding this comment

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

Wait CI is green.

@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.81%. Comparing base (decd55d) to head (599aeb5).
Report is 6 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3427      +/-   ##
============================================
+ Coverage     21.64%   27.81%   +6.16%     
- Complexity     2316     3591    +1275     
============================================
  Files           427      599     +172     
  Lines         39751    48609    +8858     
  Branches       5630     6268     +638     
============================================
+ Hits           8605    13520    +4915     
- Misses        30419    34149    +3730     
- Partials        727      940     +213     
Flag Coverage Δ
core 27.81% <100.00%> (?)
trino ?

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

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

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

Successfully merging this pull request may close these issues.

[Improvement]: Increase the default database connection pool max wait time
3 participants