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

fixbug: Ping should put resource back to the pool #74

Merged
merged 1 commit into from
May 21, 2022

Conversation

wybrobin
Copy link
Contributor

@wybrobin wybrobin commented May 20, 2022

ref: https://github.com/cectc/dbpack/issues/

Ⅰ. Describe what this PR did

I found dbpack won`t work as mysql proxy when waiting for a few minutes, and the ping would get the resource from the pool but not put it back to the pool. If the default config capacity is 30 and ping_interval is 20s, the dbpack won`t work after 30*20s=600s for the pool exhausted.

Ⅱ. Does this pull request fix one issue?

no.

Ⅲ. Why don't you add test cases (unit test/integration test)?

I had test it on my local enviroment.

Ⅳ. Describe how to verify it

Run the sample, and wait for more than 10 minutes.

Ⅴ. Special notes for reviews

nothing.

@codecov-commenter
Copy link

Codecov Report

Merging #74 (4dc3683) into dev (f798737) will not change coverage.
The diff coverage is n/a.

❗ Current head 4dc3683 differs from pull request most recent head 070f037. Consider uploading reports for the commit 070f037 to get more accurate results

@@           Coverage Diff           @@
##              dev      #74   +/-   ##
=======================================
  Coverage   31.83%   31.83%           
=======================================
  Files          47       47           
  Lines        5776     5776           
=======================================
  Hits         1839     1839           
  Misses       3749     3749           
  Partials      188      188           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f798737...070f037. Read the comment docs.

Copy link
Collaborator

@dk-lockdown dk-lockdown left a comment

Choose a reason for hiding this comment

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

LGTM

@dk-lockdown
Copy link
Collaborator

pls rebase you code with upstream

git remote add upstream  git@github.com:CECTC/dbpack.git
git fetch upstream
git pull --rebase upstream dev
git push -f

then your local code will catch up with dbpack CECTC:dev

@dk-lockdown dk-lockdown added the bug Something isn't working label May 20, 2022
Copy link
Collaborator

@bohehe bohehe left a comment

Choose a reason for hiding this comment

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

LGTM

@zhu733756
Copy link
Contributor

lgtm

@dk-lockdown dk-lockdown merged commit c1c7771 into CECTC:dev May 21, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants