logstash-input-elasticsearch 4.8.0 → 4.8.1
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/inputs/elasticsearch.rb +1 -0
- data/lib/logstash/inputs/patch.rb +48 -0
- data/logstash-input-elasticsearch.gemspec +1 -1
- metadata +3 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: f2739ba5eed141d75ad674402bb35485e0be50c6a7593556dbcda575120bbb54
         | 
| 4 | 
            +
              data.tar.gz: 1affc8bfa4aad83cda6c59f0a6b3dcf7ca24a5d7e0e53cacc66f45b88d353ce1
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: d4d2eb3be415ddf52ed7b17d06999fe93022004fcf218d11919c750e3b98f8a1ddc943d7d0911232a43fcc8f237a08ffcbd63ba5ec1dd59de9498061f4b4bf25
         | 
| 7 | 
            +
              data.tar.gz: 74524dcd7cacd49a324049f80b5cabf5bd2a96c8c634ed15877139371cc8cb89bb38c074a576a0214a3785e218ee5dc0f0966b59de75394e679d8eef34ad14ed
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -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 |  | 
| @@ -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. | 
| 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. | 
| 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- | 
| 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
         |