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

mysqlctl: Fix connection leak in edge case of killConnection(). #6245

Merged
merged 2 commits into from
May 31, 2020

Conversation

enisoc
Copy link
Member

@enisoc enisoc commented May 29, 2020

It's rare that we would hit this path, but if we do, we currently are leaking the connection because I forgot to call Close() on it.

Also adding Context to mysqld.GetDbaConnection() so the killConnection() timeout works.

It's rare that we would hit this path, but if we do, we currently are
leaking the connection because I forgot to call Close() on it.

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
@enisoc enisoc requested review from deepthi and systay May 29, 2020 20:16
@enisoc enisoc requested review from morgo and sougou as code owners May 29, 2020 20:16
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

LGTM

@sougou sougou merged commit b8479b0 into vitessio:master May 31, 2020
@enisoc enisoc deleted the mysqlctl-kill-connection branch June 1, 2020 18:19
@deepthi deepthi added this to the v7.0 milestone Jul 27, 2020
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.

3 participants