Skip to content

Cherry-pick #16001 to 7.x: Reuse connections on sql module#16027

Merged
jsoriano merged 1 commit intoelastic:7.xfrom
jsoriano:backport_16001_7.x
Feb 4, 2020
Merged

Cherry-pick #16001 to 7.x: Reuse connections on sql module#16027
jsoriano merged 1 commit intoelastic:7.xfrom
jsoriano:backport_16001_7.x

Conversation

@jsoriano
Copy link
Copy Markdown
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 jsoriano requested a review from a team as a code owner February 3, 2020 15:16
@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Feb 4, 2020

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

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