Skip to content

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

Merged
sougou merged 2 commits intovitessio:masterfrom
planetscale:mysqlctl-kill-connection
May 31, 2020
Merged

mysqlctl: Fix connection leak in edge case of killConnection().#6245
sougou merged 2 commits intovitessio:masterfrom
planetscale:mysqlctl-kill-connection

Conversation

@enisoc
Copy link
Copy Markdown
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.

enisoc added 2 commits May 29, 2020 12:54
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
Copy Markdown
Collaborator

@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