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 #16001 to 7.x: Reuse connections on sql module #16027

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Feb 3, 2020

Cherry-pick of PR #16001 to 7.x branch. Original message:

What does this PR do?

Reuse connections between fetches on SQL module.

Why is it important?

Keep a connection open with the database instead of opening and closing connections on each fetch. this is consistent with other specific SQL modules we have, and is usually also prefered by users.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

How to test this PR locally

Same instructions as in #13257, and then check in the database server that an only connection is created, and it is maintained along the lifetime of the module. This can be checked in MySQL with SHOW PROCESSLIST.

Keep a connection open with the database instead of opening
and closing connections on each fetch. this is consistent with
other specific SQL modules we have.

(cherry picked from commit 583a89c)
@jsoriano
Copy link
Member Author

jsoriano commented Feb 4, 2020

jenkins, test this again please (test_beat.Test.test_xpack failed 🤔)

@jsoriano
Copy link
Member Author

jsoriano commented Feb 4, 2020

A different test failed now, merging.

@jsoriano jsoriano merged commit abece67 into elastic:7.x Feb 4, 2020
@jsoriano jsoriano deleted the backport_16001_7.x branch February 4, 2020 14:10
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.

2 participants