logstash-integration-jdbc 5.0.2 → 5.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f36457fe1f944ea8c4f76e4da5342812f25001de5ad70fee02e501bc95d00bb0
4
- data.tar.gz: 54e15341a9a4bff91d55f76cac5515bffd3c77dc97919410dd457e9f4a56083d
3
+ metadata.gz: 1c64a823a0973adc161faebb9a8d71fbaa19b8815ebac92dbb5a85dca53a9941
4
+ data.tar.gz: effe43eb271c805374fd39084c54d4b522067a1cbaa6bc5f0efe5ad1a9264aa4
5
5
  SHA512:
6
- metadata.gz: 7057c86f73835b909f2a5d7cff2f4b59dc483bbde8e5804ee122094cb18c9682fff6575ad2f63059d27c8f7513525ecbaba23acb93effbe7f72ac1b5b0e92cbe
7
- data.tar.gz: 916f7ed28cca7c39ae481562a660945f185fda930d7012662a16e3f0f0cb285edb7716b76dbcee014aad8bfa34394441d11f9fc6bcbc607a908ce3b8f673b0a8
6
+ metadata.gz: 43b515624423bd156a471b51ed83545b91875cb364277ef79e5685ab0a019744dbe37227ec230a20f11b164df76187e4df3b4f7961aa1672ee8b36d1338e8ec8
7
+ data.tar.gz: abf96d5cd6c97f3896e60395f5f390f6e67e308e168bdbc996d095ecb5a7e0eef6e89f224a91ee0f2908210b78e852b85ab3441f660fdda2cb6cd43b3374d74c
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
+ ## 5.0.3
2
+ - Fixed issue where a lost connection to the database can cause errors when using prepared statements with the scheduler [#25](https://github.com/logstash-plugins/logstash-integration-jdbc/pull/25)
3
+
1
4
  ## 5.0.2
2
5
  - Fixed potential resource leak by ensuring scheduler is shutdown when a pipeline encounter an error during the running [#28](https://github.com/logstash-plugins/logstash-integration-jdbc/pull/28)
3
-
6
+
4
7
  ## 5.0.1
5
8
  - Fixed tracking_column regression with Postgresql Numeric types [#17](https://github.com/logstash-plugins/logstash-integration-jdbc/pull/17)
6
9
  - Fixed driver loading when file not accessible [#15](https://github.com/logstash-plugins/logstash-integration-jdbc/pull/15)
@@ -260,7 +260,9 @@ module LogStash module PluginMixins module Jdbc
260
260
  end
261
261
  success = true
262
262
  rescue Sequel::DatabaseConnectionError, Sequel::DatabaseError, Java::JavaSql::SQLException => e
263
- @logger.warn("Exception when executing JDBC query", :exception => e)
263
+ details = { :exception => e.message }
264
+ details[:backtrace] = e.backtrace if @logger.debug?
265
+ @logger.warn("Exception when executing JDBC query", details)
264
266
  else
265
267
  @value_tracker.set_value(sql_last_value)
266
268
  ensure
@@ -97,7 +97,14 @@ module LogStash module PluginMixins module Jdbc
97
97
  end
98
98
  bind_value_sql_last_value(sql_last_value)
99
99
  statement_logger.log_statement_parameters(statement, parameters, nil)
100
- db.call(name, parameters)
100
+ begin
101
+ db.call(name, parameters)
102
+ rescue => e
103
+ # clear the statement prepared flag - the statement may be closed by this
104
+ # time.
105
+ statement_prepared.make_false
106
+ raise e
107
+ end
101
108
  end
102
109
 
103
110
  def post_init(plugin)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-integration-jdbc'
3
- s.version = '5.0.2'
3
+ s.version = '5.0.3'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Integration with JDBC - input and filter plugins"
6
6
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -3,7 +3,6 @@ require "logstash/inputs/jdbc"
3
3
  require "sequel"
4
4
  require "sequel/adapters/jdbc"
5
5
 
6
- # This test requires: Firebird installed to Mac OSX, it uses the built-in example database `employee`
7
6
 
8
7
  describe LogStash::Inputs::Jdbc, :integration => true do
9
8
  # This is a necessary change test-wide to guarantee that no local timezone
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-integration-jdbc
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2
4
+ version: 5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-11 00:00:00.000000000 Z
11
+ date: 2020-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement