logstash-output-elasticsearch 11.15.4-java → 11.15.6-java

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: 35c442c72cb3629cc3d17b28bffce6351c6e61a6332c254bef41ad89c9cc2810
4
- data.tar.gz: 396df2b1625d0b62f8f71982203f01f1fa8901a6ccaf2098e10b51c4f77c9d80
3
+ metadata.gz: 6765698cd332b5580c1b49535a5547a145547bf10fc3d16441f5a0188607f432
4
+ data.tar.gz: bff7bc6c7003596a85d06e4fb2217d807c6d842b03a270de140022afcd1afe01
5
5
  SHA512:
6
- metadata.gz: 3acda17f89403df63a709bedb84481c259178c97963120cce9452565d1d93981ac4a8b3766c9de2ee356d540f38109afbaf03cba3de17402551ee55cc09e74ce
7
- data.tar.gz: fb405743b1746631fe84e4b346810df84b21955bb7ef0d5adf122d03d9e7fc739fde8623947fc9ae94d1139cb34ecef869eb18141344231183d844a334b3b6dd
6
+ metadata.gz: acd145b600d7985750baf4a3d0304c41a713400e22d5f09180497fbb4df624d32910bb475f7660f1a34c1a5ac9eee7ba43a40c1404f054644628ffc16fcf30b8
7
+ data.tar.gz: ee3c3bc4a56296229af8a7b776e205900584705d9daaf1f3c1cc5d1061f2e87e70cc8ffd7298d6442b630ac7ca5d453ab27b33de7b287e34ac5be23772343b0a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 11.15.6
2
+ - Fix: avoid to reject a batch when the Elasticsearch connection is alive and the processing should continue [#1132](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1132).
3
+
4
+ ## 11.15.5
5
+ - Fixes `undefined 'shutdown_requested' method` error when plugin checks if shutdown request is received [#1134](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1134)
6
+
1
7
  ## 11.15.4
2
8
  - Improved connection handling under several partial-failure scenarios [#1130](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1130)
3
9
  - Ensures an HTTP connection can be established before adding the connection to the pool
@@ -432,7 +432,7 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
432
432
  return unless after_successful_connection_done
433
433
  stoppable_sleep 1 until (after_successful_connection_done.true? || pipeline_shutdown_requested?)
434
434
 
435
- if pipeline_shutdown_requested?
435
+ if pipeline_shutdown_requested? && !after_successful_connection_done.true?
436
436
  logger.info "Aborting the batch due to shutdown request while waiting for connections to become live"
437
437
  abort_batch_if_available!
438
438
  end
@@ -376,9 +376,9 @@ module LogStash; module PluginMixins; module ElasticSearch
376
376
  end
377
377
 
378
378
  def pipeline_shutdown_requested?
379
- return super if defined?(super) # since LS 8.1.0
380
- execution_context&.pipeline&.shutdown_requested
381
- end
379
+ return super if defined?(super) # since LS 8.1.0
380
+ execution_context&.pipeline&.shutdown_requested?
381
+ end
382
382
 
383
383
  def abort_batch_if_available!
384
384
  raise org.logstash.execution.AbortedBatchException.new if abort_batch_present?
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-elasticsearch'
3
- s.version = '11.15.4'
3
+ s.version = '11.15.6'
4
4
  s.licenses = ['apache-2.0']
5
5
  s.summary = "Stores logs in Elasticsearch"
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"
@@ -1,7 +1,7 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIFDDCCAvQCAQEwDQYJKoZIhvcNAQEFBQAwTDELMAkGA1UEBhMCUFQxCzAJBgNV
2
+ MIIFDDCCAvQCAQEwDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCUFQxCzAJBgNV
3
3
  BAgMAk5BMQ8wDQYDVQQHDAZMaXNib24xDjAMBgNVBAoMBU15TGFiMQ8wDQYDVQQD
4
- DAZSb290Q0EwHhcNMjIwNTIzMTcyODU1WhcNMjMwNTIzMTcyODU1WjBMMQswCQYD
4
+ DAZSb290Q0EwHhcNMjMwNTMwMTUxM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pjExLVXXTF216Ahd7vQWDWqZkYNi3
25
+ ji1jZSemBWyv/bDxo/STLL/QiX73WuxelerZeMxS03U6KYyhtTLxDvpeOCstbe1u
26
+ wI9LfpdtAbXP+d/djvYJSHb6WoS4Oya2mnyddqDd6Mfn7lTudhqtw5CLV+sElnFf
27
+ XDBjDp6tWUin6s/IWPVnvMceZW/sW7oO3sy9NKQx1acHh85WIMrZ+9iVvwcvQMRF
28
+ p/bTR2VL3jD5fioNyfBmmQ17wIOIm3QvY+nJmzOWalzYYzottPTiabzKYap7Ulcx
29
+ HDB+ZvuJBA==
30
30
  -----END CERTIFICATE-----
@@ -1 +1 @@
1
- dca380f330bdf3d4b242b3c48d541c4698eaffa0d532316b27e6080443e601b5
1
+ b6ee8b4a213328074df1da1f3b8fdde95c5e97e9b1d7da58dad0537a04939b97
Binary file
@@ -58,7 +58,27 @@ describe LogStash::Outputs::ElasticSearch do
58
58
 
59
59
  let(:logger) { double("logger") }
60
60
 
61
+ let(:never_ending) { Thread.new { sleep 1 while true } }
62
+
63
+ let(:do_register) { false }
64
+
61
65
  before(:each) do
66
+ spy_http_client_builder!
67
+ stub_http_client_pool!
68
+
69
+ allow(subject).to receive(:finish_register) # stub-out thread completion (to avoid error log entries)
70
+
71
+ # emulate 'failed' ES connection, which sleeps forever
72
+ allow(subject).to receive(:after_successful_connection) { |&block| never_ending }
73
+ allow(subject).to receive(:stop_after_successful_connection_thread)
74
+
75
+ subject.register
76
+
77
+ allow(subject.client).to receive(:maximum_seen_major_version).at_least(:once).and_return(maximum_seen_major_version)
78
+ allow(subject.client).to receive(:get_xpack_info)
79
+
80
+ subject.client.pool.adapter.manticore.respond_with(:body => "{}")
81
+
62
82
  allow(subject).to receive(:logger).and_return(logger)
63
83
  allow(logger).to receive(:info)
64
84
 
@@ -73,6 +93,25 @@ describe LogStash::Outputs::ElasticSearch do
73
93
  end
74
94
  end
75
95
 
96
+ context "on a reachable ES instance" do
97
+ let(:events) { [ ::LogStash::Event.new("foo" => "bar1"), ::LogStash::Event.new("foo" => "bar2") ] }
98
+
99
+ let(:logger) { double("logger") }
100
+
101
+ before(:each) do
102
+ allow(subject).to receive(:logger).and_return(logger)
103
+ allow(logger).to receive(:info)
104
+
105
+ allow(subject).to receive(:pipeline_shutdown_requested?).and_return(true)
106
+ allow(subject).to receive(:retrying_submit)
107
+ end
108
+
109
+ it "the #multi_receive doesn't abort when waiting for a connection on alive ES and a shutdown is requested" do
110
+ subject.multi_receive(events)
111
+ expect(logger).to_not have_received(:info).with(/Aborting the batch due to shutdown request while waiting for connections to become live/i)
112
+ end
113
+ end
114
+
76
115
  context "when a connected ES becomes unreachable" do
77
116
  # let(:error) do
78
117
  # ::LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError.new(
@@ -116,6 +155,9 @@ describe LogStash::Outputs::ElasticSearch do
116
155
  end
117
156
 
118
157
  it "should exit the retry with an abort exception if shutdown is requested" do
158
+ # trigger the shutdown signal
159
+ allow(subject).to receive(:pipeline_shutdown_requested?) { true }
160
+
119
161
  # execute in another thread because it blocks in a retry loop until the shutdown is triggered
120
162
  th = Thread.new do
121
163
  subject.multi_receive([event])
@@ -124,9 +166,6 @@ describe LogStash::Outputs::ElasticSearch do
124
166
  e.class
125
167
  end
126
168
 
127
- # trigger the shutdown signal
128
- allow(subject).to receive(:pipeline_shutdown_requested?) { true }
129
-
130
169
  expect(th.value).to eq(org.logstash.execution.AbortedBatchException)
131
170
  end
132
171
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.15.4
4
+ version: 11.15.6
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-15 00:00:00.000000000 Z
11
+ date: 2023-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement