Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

basedb: close db when fail ping (#942) #943

Merged
merged 3 commits into from
Aug 28, 2020

Conversation

ti-srebot
Copy link

cherry-pick #942 to release-2.0


What problem does this PR solve?

DB connection leak when successful open DB but failed ping.

What is changed and how it works?

close it manually. alternative is we should return db, error to caller instead of nil, error, so caller's rollback function could handle closing DB.

Check List

Tests

  • unit test

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

@ti-srebot ti-srebot added priority/unimportant Really minor change, requires approval from secondary reviewers type/bug-fix Bug fix type/cherry-pick This PR is just a cherry-pick (backport) labels Aug 28, 2020
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@csuzhangxc csuzhangxc added this to the v2.0.0 RC.2 milestone Aug 28, 2020
@csuzhangxc csuzhangxc added the needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated label Aug 28, 2020
@GMHDBJD
Copy link
Collaborator

GMHDBJD commented Aug 28, 2020

/run-all-tests

Copy link
Collaborator

@GMHDBJD GMHDBJD left a comment

Choose a reason for hiding this comment

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

LGTM

@GMHDBJD GMHDBJD added the status/LGT2 Two reviewers already commented LGTM, ready for merge label Aug 28, 2020
@lance6716 lance6716 merged commit c8f2949 into pingcap:release-2.0 Aug 28, 2020
@csuzhangxc csuzhangxc added already-update-release-note The release note is updated. Add this label once the release note is updated and removed needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated labels Aug 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
already-update-release-note The release note is updated. Add this label once the release note is updated priority/unimportant Really minor change, requires approval from secondary reviewers status/LGT2 Two reviewers already commented LGTM, ready for merge type/bug-fix Bug fix type/cherry-pick This PR is just a cherry-pick (backport)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants