logstash-integration-jdbc 5.1.5 → 5.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71904a199b39255cbefb08b1c43a08e0507df8af19be11ae3b57b69519d337f5
4
- data.tar.gz: 17e4ef460ad1e9d51d0ecada1d94b6d41951a65e65f316e287ad58331f5a4211
3
+ metadata.gz: ef9180da50049c113170083c54826d75aadc91883fdca644bd82b5802ccd7234
4
+ data.tar.gz: 55b6adf668a1aac55c7a5883ae02de29431bcdf1e58d2177ab6004524bd99780
5
5
  SHA512:
6
- metadata.gz: 503737f45cfcba0724d533664b14bda25bf9abd0c5de549973857855f00722a666022693d1d22e517b735e6171a06d20cd31e11492c7d60321b3456627eab05f
7
- data.tar.gz: 78d36bd182723abdc72ebf7809f76b86111d3e8bc4111bb08c5a8363fe88e8fe38c4ab563f1408f60c7b0b491f3802c69a31259e4035e8bebcd4bbfc5e8636d9
6
+ metadata.gz: 22e48f5ac21bde7821142cc77accd458dd695a8895941bed7d7a495459d06663c2166c94c91f9592f1621f119a9c796c186401542a8085f01abd6544b3345376
7
+ data.tar.gz: 3f0a613c6bd1d4a9c8b272ec6b344bc0f791f5a137f25adbee547fbece9d7a5a01028f125641255186266d47714bb47e499325c21700d865c4cc9bf22dd529f2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 5.1.6
2
+ - Fix, serialize the JDBC driver loading steps to avoid concurrency issues [#84](https://github.com/logstash-plugins/logstash-integration-jdbc/pull/84)
3
+
1
4
  ## 5.1.5
2
5
  - Refined ECS support [#82](https://github.com/logstash-plugins/logstash-integration-jdbc/pull/82)
3
6
  - Uses shared `target` guidance when ECS compatibility is enabled
@@ -4,6 +4,8 @@ module LogStash module PluginMixins module Jdbc
4
4
 
5
5
  private
6
6
 
7
+ DRIVERS_LOADING_LOCK = java.util.concurrent.locks.ReentrantLock.new()
8
+
7
9
  def complete_sequel_opts(defaults = {})
8
10
  sequel_opts = @sequel_opts.
9
11
  map { |key,val| [key.is_a?(String) ? key.to_sym : key, val] }.
@@ -22,18 +24,25 @@ module LogStash module PluginMixins module Jdbc
22
24
  require "sequel"
23
25
  require "sequel/adapters/jdbc"
24
26
 
25
- load_driver_jars
27
+ # execute all the driver loading related duties in a serial fashion to avoid
28
+ # concurrency related problems with multiple pipelines and multiple drivers
29
+ DRIVERS_LOADING_LOCK.lock()
26
30
  begin
27
- @driver_impl = Sequel::JDBC.load_driver(@jdbc_driver_class)
28
- rescue Sequel::AdapterNotFound => e # Sequel::AdapterNotFound, "#{@jdbc_driver_class} not loaded"
29
- # fix this !!!
30
- message = if jdbc_driver_library_set?
31
- "Are you sure you've included the correct jdbc driver in :jdbc_driver_library?"
32
- else
33
- ":jdbc_driver_library is not set, are you sure you included " +
34
- "the proper driver client libraries in your classpath?"
35
- end
36
- raise LogStash::PluginLoadingError, "#{e}. #{message}"
31
+ load_driver_jars
32
+ begin
33
+ @driver_impl = Sequel::JDBC.load_driver(@jdbc_driver_class)
34
+ rescue Sequel::AdapterNotFound => e # Sequel::AdapterNotFound, "#{@jdbc_driver_class} not loaded"
35
+ # fix this !!!
36
+ message = if jdbc_driver_library_set?
37
+ "Are you sure you've included the correct jdbc driver in :jdbc_driver_library?"
38
+ else
39
+ ":jdbc_driver_library is not set, are you sure you included " +
40
+ "the proper driver client libraries in your classpath?"
41
+ end
42
+ raise LogStash::PluginLoadingError, "#{e}. #{message} #{e.backtrace}"
43
+ end
44
+ ensure
45
+ DRIVERS_LOADING_LOCK.unlock()
37
46
  end
38
47
  end
39
48
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-integration-jdbc'
3
- s.version = '5.1.5'
3
+ s.version = '5.1.6'
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"
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.1.5
4
+ version: 5.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-04 00:00:00.000000000 Z
11
+ date: 2021-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -252,7 +252,6 @@ files:
252
252
  - CONTRIBUTORS
253
253
  - Gemfile
254
254
  - LICENSE
255
- - NOTICE.TXT
256
255
  - README.md
257
256
  - docs/filter-jdbc_static.asciidoc
258
257
  - docs/filter-jdbc_streaming.asciidoc
data/NOTICE.TXT DELETED
@@ -1,5 +0,0 @@
1
- Elasticsearch
2
- Copyright 2012-2018 Elasticsearch
3
-
4
- This product includes software developed by The Apache Software
5
- Foundation (http://www.apache.org/).