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

Fix prepared statement reconnect issue #25

Merged
merged 3 commits into from
May 20, 2020

Conversation

robbavey
Copy link
Contributor

@robbavey robbavey commented Apr 7, 2020

This commit fixes an issue where, if the connection between Logstash
and the database fails due to an attempt to use a closed prepared statement.
This results in subsequent attempts to use a prepared statement
failing when using scheduling, which can only be rectified by restarting Logstash.

This commit resets the statement_prepared flag, which means that the
prepared statement will be recreated upon the next scheduled run.

This commit also adds a backtrace to log entries when this issue occurs to provide
more visibility into the cause of the issue.

Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/

Copy link
Contributor

@yaauie yaauie left a comment

Choose a reason for hiding this comment

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

LGTM, let's get this fix shipped 🎉

This commit fixes an issue where, if the connection between Logstash
and the database fails due to an attempt to use a closed prepared statement.
This results in subsequent attempts to use a prepared statement
failing when using scheduling, which can only be rectified by restarting Logstash.

This commit resets the `statement_prepared` flag, which means that the
prepared statement will be recreated upon the next scheduled run.

This commit also adds a backtrace to log entries when this issue occurs to provide
more visibility into the cause of the issue.
@robbavey robbavey merged commit bb27219 into logstash-plugins:master May 20, 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.

2 participants