node-mysql2 icon indicating copy to clipboard operation
node-mysql2 copied to clipboard

fix: gracefully close pool connections

Open dstankovd opened this issue 1 year ago • 12 comments

Fixes #3148

dstankovd avatar Nov 04 '24 10:11 dstankovd

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.15%. Comparing base (de94ba9) to head (65fda1e). Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3180      +/-   ##
==========================================
+ Coverage   89.08%   89.15%   +0.07%     
==========================================
  Files          86       86              
  Lines       13531    13528       -3     
  Branches     1569     1570       +1     
==========================================
+ Hits        12054    12061       +7     
+ Misses       1477     1467      -10     
Flag Coverage Δ
compression-0 89.15% <100.00%> (+0.07%) :arrow_up:
compression-1 89.15% <100.00%> (+0.07%) :arrow_up:
static-parser-0 86.73% <100.00%> (+0.07%) :arrow_up:
static-parser-1 87.51% <100.00%> (+0.07%) :arrow_up:
tls-0 88.57% <100.00%> (+0.07%) :arrow_up:
tls-1 88.92% <100.00%> (+0.07%) :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.

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

codecov[bot] avatar Nov 04 '24 10:11 codecov[bot]

Thanks, @dstankovd 🙋🏻‍♂️

Do you think a test can be added to cover these changes?

wellwelwel avatar Nov 05 '24 17:11 wellwelwel

Thanks, @dstankovd 🙋🏻‍♂️

Do you think a test can be added to cover these changes?

Hey, I've added a new test covering theses changes :)

dstankovd avatar Nov 05 '24 21:11 dstankovd

@dstankovd, in #3081 we moved the lib/pool.js and lib/pool_connection.js to lib/base/pool.js and lib/base/pool_connection.js. This led to the need for a rebase.

Sorry for the inconvenience 🙋🏻‍♂️

Also, thanks for the tests 🤝

wellwelwel avatar Nov 14 '24 01:11 wellwelwel

Hey @wellwelwel. I've rebased the branch, not sure why there are failed checks tho..

dstankovd avatar Nov 14 '24 16:11 dstankovd

@dstankovd, I don't know if it's a bug or if it's intentional, but it seems that Deno has completely removed support for local CommonJS in the canary version.

In any case, the failed workflows are unrelated to your changes 🙋🏻‍♂️


Edit: Not a bug, but a breaking change (already fixed in #3209).

wellwelwel avatar Nov 14 '24 22:11 wellwelwel

I've rebased the branch, not sure why there are failed checks tho..

@sidorares, could you enable the following option in the repository settings?

Screenshot 2024-11-14 at 21 12 49
  • This will display a button that allows us to automatically rebase outdated branches without conflict.

wellwelwel avatar Nov 15 '24 00:11 wellwelwel

Hey @wellwelwel ,

rebased again, so all checks should pass now :)

dstankovd avatar Nov 16 '24 19:11 dstankovd

Hello, any plans on when will this fix be released?

Hi @dygabo, this PR seems to remove a depreciation:

  • Original warning

https://github.com/sidorares/node-mysql2/blob/e455b6b23e7ce8dcd91cbb3fa39b616c8fb8479d/lib/base/pool_connection.js#L32-L42


For this reason, I prefer to keep the "merge" action to @sidorares 🙋🏻‍♂️

wellwelwel avatar Dec 21 '24 20:12 wellwelwel

We currently have the problem solved by this PR... seems to me that all steps are gone well. I see that remains some conflicts (but I can't see them) any chances to go further with this? Is not clear to me if any other help is useful at this point.

Zikoel avatar Mar 10 '25 13:03 Zikoel

Hi @wellwelwel @sidorares : any plans on when will this fix be released?

SavvasSunilBelakeri avatar Mar 12 '25 02:03 SavvasSunilBelakeri

We are also waiting for this to be added.

ZoRDoK avatar Apr 16 '25 08:04 ZoRDoK