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

chore: set maxIdleConns for jobsdb handles and emit (*sql.DB).Stats #5123

Merged
merged 6 commits into from
Sep 23, 2024

Conversation

Sidddddarth
Copy link
Member

Description

  1. Set maxIdleConns for all the jobsdb handles.
    The current default is only 2 max idle conns per pool which causes a lot of turnaround and consistent new connections. Setting it to the same as max open connections.
  2. Emit periodic (*sql.DB).Stats(). that gauge the total closed(due to maxIdleConns) every 15 seconds(configurable).
  3. Add tablePrefix to the jobsdb connection pool's application_name.

Linear Ticket

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@Sidddddarth Sidddddarth enabled auto-merge (squash) September 23, 2024 07:36
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.

Please upload report for BASE (release/1.34.x@53386d6). Learn more about missing BASE report.
Report is 1 commits behind head on release/1.34.x.

Files with missing lines Patch % Lines
jobsdb/jobsdb.go 96.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             release/1.34.x    #5123   +/-   ##
=================================================
  Coverage                  ?   73.02%           
=================================================
  Files                     ?      435           
  Lines                     ?    50477           
  Branches                  ?        0           
=================================================
  Hits                      ?    36862           
  Misses                    ?    11207           
  Partials                  ?     2408           

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

@Sidddddarth Sidddddarth merged commit 2aafc50 into release/1.34.x Sep 23, 2024
56 checks passed
@Sidddddarth Sidddddarth deleted the chore.jobsdbSetMaxIdleConns branch September 23, 2024 11:45
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.

4 participants