Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace document_already_exist_exception with version_conflict_engine_exception in the silence_errors_in_log setting example #1159

Merged
merged 2 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 11.20.1
- 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)

## 11.20.0
- 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)

Expand Down
4 changes: 2 additions & 2 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -988,12 +988,12 @@ if enabled, script is in charge of creating non-existent document (scripted upda

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

[source,ruby]
output {
elasticsearch {
silence_errors_in_log => ["document_already_exists_exception"]
silence_errors_in_log => ["version_conflict_engine_exception"]
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/plugin_mixins/elasticsearch/api_configs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ module APIConfigs

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

Expand Down
2 changes: 1 addition & 1 deletion logstash-output-elasticsearch.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'logstash-output-elasticsearch'
s.version = '11.20.0'
s.version = '11.20.1'
s.licenses = ['apache-2.0']
s.summary = "Stores logs in Elasticsearch"
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"
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/outputs/error_whitelist_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"create" => {
"status" => 409,
"error" => {
"type" => "document_already_exists_exception",
"type" => "version_conflict_engine_exception",
"reason" => "[shard] document already exists"
}
}
Expand All @@ -46,7 +46,7 @@
end

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

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