logstash-integration-jdbc 5.1.5 → 5.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/plugin_mixins/jdbc/common.rb +20 -11
- data/logstash-integration-jdbc.gemspec +1 -1
- metadata +2 -3
- data/NOTICE.TXT +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef9180da50049c113170083c54826d75aadc91883fdca644bd82b5802ccd7234
|
4
|
+
data.tar.gz: 55b6adf668a1aac55c7a5883ae02de29431bcdf1e58d2177ab6004524bd99780
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
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.
|
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.
|
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-
|
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
|