logstash-input-jdbc 4.2.4 → 4.3.0

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
  SHA1:
3
- metadata.gz: f152eb0f75f58fc955c3d96db6d7cd5c6efe044b
4
- data.tar.gz: 7b033a4b940622e5b629335fe890476fa37e848f
3
+ metadata.gz: 23a5c2c6b744d78dbfe02dbeed5849c13682990c
4
+ data.tar.gz: ddcc30f19579b97f5fc3720ade23460eed65aa61
5
5
  SHA512:
6
- metadata.gz: abdd95f81a9c693886028bfd61b9f2142a3e1a4178a9f1ab314a486442230a5ed1bd32df056895f444f87802c5d9137d534e205fd4c5ea49b202dbae04a7f701
7
- data.tar.gz: dc992299c06f8390e4a7a698386eababd7af6cee634913d5afeb6eb395c3b19277b9f8bf46d07bfb0d27c426798eee78ea7d6f7f3bc0d86b49e39ed555292cdf
6
+ metadata.gz: 04f46de1c612553e4fb4be725168eda9d43c0ecd12800d03745aef7cda3ac244f2621e631bdd812fbad0b27b5fc1b408b95f3b6bcfdd3ee14f6c2ad60e2bc1e3
7
+ data.tar.gz: 888454f2452849be6445f5241db822ee95b3a82424160c5c5a8d127b5380b5fd5555352ed1958dec2615ea756834a48a3940618e094f2f702000e43e9bc4db0a
@@ -1,3 +1,6 @@
1
+ ## 4.3.0
2
+ - [#147](https://github.com/logstash-plugins/logstash-input-jdbc/issues/147) Open and close connection for each query
3
+
1
4
  ## 4.2.4
2
5
  - [#220](https://github.com/logstash-plugins/logstash-input-jdbc/issues/220) Log exception when database connection test fails
3
6
  - Database reconnect: Mark old connection as dead even when clean disconnect fails.
@@ -210,15 +210,14 @@ module LogStash::PluginMixins::Jdbc
210
210
  rescue => e
211
211
  @logger.warn("Failed to close connection", :exception => e)
212
212
  end
213
- @database = nil
214
213
  end
215
214
 
216
215
  public
217
216
  def execute_statement(statement, parameters)
218
217
  success = false
218
+ open_jdbc_connection
219
219
  begin
220
220
  parameters = symbolized_params(parameters)
221
- open_jdbc_connection if @database == nil
222
221
  query = @database[statement, parameters]
223
222
  sql_last_value = @use_column_value ? @sql_last_value : Time.now.utc
224
223
  @tracking_column_warning_sent = false
@@ -246,12 +245,10 @@ module LogStash::PluginMixins::Jdbc
246
245
  success = true
247
246
  rescue Sequel::DatabaseConnectionError, Sequel::DatabaseError => e
248
247
  @logger.warn("Exception when executing JDBC query", :exception => e)
249
- @logger.warn("Attempt reconnection.")
250
- close_jdbc_connection()
251
- open_jdbc_connection()
252
248
  else
253
249
  @sql_last_value = sql_last_value
254
250
  end
251
+ close_jdbc_connection
255
252
  return success
256
253
  end
257
254
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-jdbc'
3
- s.version = '4.2.4'
3
+ s.version = '4.3.0'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "This example input streams a string at a definable interval."
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"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-jdbc
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.4
4
+ version: 4.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-21 00:00:00.000000000 Z
11
+ date: 2017-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement