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

Cherry-pick #10355 to 6.x: New functions to close a mysql connection. #10394

Merged
merged 1 commit into from
Jan 30, 2019

Conversation

jsoriano
Copy link
Member

Cherry-pick of PR #10355 to 6.x branch. Original message:

This is a possible fix for issue #9415. Added a function in the mysql file and
a method for the metricset to close the db too.

I wanted to give it a shot since the last update was done more than 1 month ago. After researching the issue and feedback I thought about this possible solution. Is my approach good or do you prefer the metricset method doing all the work without calling to a function in the mysql file?

Let me know if there's a specific place where these functions should be called.

Also,
https://github.com/elastic/beats/blob/824d443bc182a12f30859667da4739beef9c8606/metricbeat/mb/module/wrapper_test.go#L66
is empty. Should it call these new functions for assertion? Just thinking of a possible new commit.

Fixes elastic#9415 by closing the db handle.

(cherry picked from commit f06cf46)
@jsoriano jsoriano merged commit 8b235a9 into elastic:6.x Jan 30, 2019
@jsoriano jsoriano deleted the backport_10355_6.x branch January 30, 2019 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants