pmm icon indicating copy to clipboard operation
pmm copied to clipboard

PMM-12896 Add limit for actions/jobs executed on the same DB at the same time

Open artemgavrilov opened this issue 11 months ago • 2 comments

PMM-12896

Link to the Feature Build: SUBMODULES-3588

artemgavrilov avatar Mar 13 '24 17:03 artemgavrilov

Codecov Report

Attention: Patch coverage is 57.43945% with 123 lines in your changes are missing coverage. Please review.

Project coverage is 41.80%. Comparing base (b4a4c6d) to head (256c8b1). Report is 2 commits behind head on main.

Files Patch % Lines
agent/runner/jobs/pbm_helpers.go 0.00% 25 Missing :warning:
agent/runner/runner.go 86.25% 12 Missing and 6 partials :warning:
agent/client/client.go 6.25% 15 Missing :warning:
agent/runner/jobs/mongodb_backup_job.go 20.00% 8 Missing :warning:
agent/runner/actions/mongodb_explain_action.go 50.00% 4 Missing and 1 partial :warning:
...unner/actions/mongodb_query_admincommand_action.go 44.44% 4 Missing and 1 partial :warning:
...t/runner/actions/postgresql_query_select_action.go 58.33% 4 Missing and 1 partial :warning:
...ent/runner/actions/postgresql_query_show_action.go 50.00% 4 Missing and 1 partial :warning:
...ner/actions/postgresql_show_create_table_action.go 50.00% 4 Missing and 1 partial :warning:
...ent/runner/actions/postgresql_show_index_action.go 50.00% 4 Missing and 1 partial :warning:
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2898      +/-   ##
==========================================
- Coverage   43.28%   41.80%   -1.48%     
==========================================
  Files         399      397       -2     
  Lines       41394    48489    +7095     
==========================================
+ Hits        17916    20272    +2356     
- Misses      21477    26213    +4736     
- Partials     2001     2004       +3     
Flag Coverage Δ
agent 52.83% <57.43%> (+0.15%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 14 '24 10:03 codecov[bot]

Do we really need to limit connections for any other DB types except PostgreSQL? Does it affect other DBs the same way as it does for PostgreSQL. I'm affraid of doing more harm then providing advantage with these changes.

MySQL and MongoDB don't have such problems with connections as PostgreSQL, but it may be still an issue. For example MySQL by default allows 151 connections. So having some limits on our side sounds like a good idea. Moreover with this change we can say exactly how many connections do we need. But I'm agree that we need to test that overall user experience is still good.

artemgavrilov avatar Mar 19 '24 17:03 artemgavrilov