logstash-input-elasticsearch 4.8.0 → 4.8.1

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: 74690fbfa461c4c9087181c3f95e4feb33f68e6398cc357a1c8d12d6bca8d837
4
- data.tar.gz: 67425c9a092529e779e0c7693cc8afa9eaed0cfb188509026881d1972f970f3c
3
+ metadata.gz: f2739ba5eed141d75ad674402bb35485e0be50c6a7593556dbcda575120bbb54
4
+ data.tar.gz: 1affc8bfa4aad83cda6c59f0a6b3dcf7ca24a5d7e0e53cacc66f45b88d353ce1
5
5
  SHA512:
6
- metadata.gz: 63482d80b537ba41ca5d3ed34a1e35dc6550887747b7d50a7320564dbd5fcac3336519cae21c21363322616f6a1c66f803743e2246e2d2dc8adf2b03b0a23231
7
- data.tar.gz: 98547555319b8d856ea58ed33b8236fcf15c2483594ca45c9c2e09791b4a20f6250ae7019e4e1be341f2000816a90e522b8c6fb21bec3b1aebc6b511cce2e09a
6
+ metadata.gz: d4d2eb3be415ddf52ed7b17d06999fe93022004fcf218d11919c750e3b98f8a1ddc943d7d0911232a43fcc8f237a08ffcbd63ba5ec1dd59de9498061f4b4bf25
7
+ data.tar.gz: 74524dcd7cacd49a324049f80b5cabf5bd2a96c8c634ed15877139371cc8cb89bb38c074a576a0214a3785e218ee5dc0f0966b59de75394e679d8eef34ad14ed
@@ -1,3 +1,6 @@
1
+ ## 4.8.1
2
+ - Fixed connection error when using multiple `slices`. [#133](https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/133)
3
+
1
4
  ## 4.8.0
2
5
  - Added the ability to configure connection-, request-, and socket-timeouts with `connect_timeout_seconds`, `request_timeout_seconds`, and `socket_timeout_seconds` [#121](https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/121)
3
6
 
@@ -4,6 +4,7 @@ require "logstash/namespace"
4
4
  require "logstash/json"
5
5
  require "logstash/util/safe_uri"
6
6
  require "base64"
7
+ require_relative "patch"
7
8
 
8
9
 
9
10
  # .Compatibility Note
@@ -0,0 +1,48 @@
1
+ if Gem.loaded_specs['elasticsearch-transport'].version >= Gem::Version.new("7.2.0")
2
+ # elasticsearch-transport versions prior to 7.2.0 suffered of a race condition on accessing
3
+ # the connection pool. This issue was fixed with https://github.com/elastic/elasticsearch-ruby/commit/15f9d78591a6e8823948494d94b15b0ca38819d1
4
+ # This plugin, at the moment, is forced to use v5.x so we have to monkey patch the gem. When this requirement
5
+ # ceases, this patch could be removed.
6
+ puts "WARN remove the patch code into logstash-input-elasticsearch plugin"
7
+ else
8
+ module Elasticsearch
9
+ module Transport
10
+ module Transport
11
+ module Connections
12
+ module Selector
13
+
14
+ # "Round-robin" selector strategy (default).
15
+ #
16
+ class RoundRobin
17
+ include Base
18
+
19
+ # @option arguments [Connections::Collection] :connections Collection with connections.
20
+ #
21
+ def initialize(arguments = {})
22
+ super
23
+ @mutex = Mutex.new
24
+ @current = nil
25
+ end
26
+
27
+ # Returns the next connection from the collection, rotating them in round-robin fashion.
28
+ #
29
+ # @return [Connections::Connection]
30
+ #
31
+ def select(options={})
32
+ @mutex.synchronize do
33
+ conns = connections
34
+ if @current && (@current < conns.size-1)
35
+ @current += 1
36
+ else
37
+ @current = 0
38
+ end
39
+ conns[@current]
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-elasticsearch'
4
- s.version = '4.8.0'
4
+ s.version = '4.8.1'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Reads query results from an Elasticsearch cluster"
7
7
  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-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.0
4
+ version: 4.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-17 00:00:00.000000000 Z
11
+ date: 2020-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -200,6 +200,7 @@ files:
200
200
  - README.md
201
201
  - docs/index.asciidoc
202
202
  - lib/logstash/inputs/elasticsearch.rb
203
+ - lib/logstash/inputs/patch.rb
203
204
  - logstash-input-elasticsearch.gemspec
204
205
  - spec/es_helper.rb
205
206
  - spec/fixtures/test_certs/ca/ca.crt