Skip to content

Commit 2abec75

Browse files
authored
Replace document_already_exist_exception with version_conflict_engine_exception in the silence_errors_in_log setting example (#1159)
* Replace in the example for silence_errors_in_log the deprecated document_already_exists_exception with version_conflict_engine_exception
1 parent a2674cf commit 2abec75

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 11.20.1
2+
- Replace `document_already_exist_exception` with `version_conflict_engine_exception` in the `silence_errors_in_log` setting example [#1159](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1159)
3+
14
## 11.20.0
25
- Changed the register to initiate pipeline shutdown upon bootstrap failure instead of simply logging the error [#1151](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1151)
36

docs/index.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,12 +988,12 @@ if enabled, script is in charge of creating non-existent document (scripted upda
988988

989989
Defines the list of Elasticsearch errors that you don't want to log.
990990
A useful example is when you want to skip all 409 errors
991-
which are `document_already_exists_exception`.
991+
which are `version_conflict_engine_exception`.
992992

993993
[source,ruby]
994994
output {
995995
elasticsearch {
996-
silence_errors_in_log => ["document_already_exists_exception"]
996+
silence_errors_in_log => ["version_conflict_engine_exception"]
997997
}
998998
}
999999

lib/logstash/plugin_mixins/elasticsearch/api_configs.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ module APIConfigs
149149

150150
# Defines the list of Elasticsearch errors that you don't want to log.
151151
# A useful example is when you want to skip all 409 errors
152-
# which are `document_already_exists_exception`.
152+
# which are `version_conflict_engine_exception`.
153153
# Deprecates `failure_type_logging_whitelist`.
154154
:silence_errors_in_log => { :validate => :array, :default => [] },
155155

logstash-output-elasticsearch.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'logstash-output-elasticsearch'
3-
s.version = '11.20.0'
3+
s.version = '11.20.1'
44
s.licenses = ['apache-2.0']
55
s.summary = "Stores logs in Elasticsearch"
66
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"

spec/unit/outputs/error_whitelist_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"create" => {
2626
"status" => 409,
2727
"error" => {
28-
"type" => "document_already_exists_exception",
28+
"type" => "version_conflict_engine_exception",
2929
"reason" => "[shard] document already exists"
3030
}
3131
}
@@ -46,7 +46,7 @@
4646
end
4747

4848
describe "when failure logging is disabled for document exists error" do
49-
let(:settings) { super().merge("silence_errors_in_log" => ["document_already_exists_exception"]) }
49+
let(:settings) { super().merge("silence_errors_in_log" => ["version_conflict_engine_exception"]) }
5050

5151
it "should log a failure on the action" do
5252
expect(subject.logger).not_to have_received(:warn).with("Failed action", anything)

0 commit comments

Comments
 (0)