From 69d214dd250148d5b715349b8e947245d1e641a0 Mon Sep 17 00:00:00 2001 From: Mirko Bez Date: Thu, 9 Nov 2023 16:44:39 +0100 Subject: [PATCH 1/2] Replace in the example for silence_errors_in_log the deprecated document_already_exists_exception with version_conflict_engine_exception --- docs/index.asciidoc | 4 ++-- lib/logstash/plugin_mixins/elasticsearch/api_configs.rb | 2 +- spec/unit/outputs/error_whitelist_spec.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/index.asciidoc b/docs/index.asciidoc index 3dc74449..97f2484f 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -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"] } } diff --git a/lib/logstash/plugin_mixins/elasticsearch/api_configs.rb b/lib/logstash/plugin_mixins/elasticsearch/api_configs.rb index 7532e6ab..f55ad863 100644 --- a/lib/logstash/plugin_mixins/elasticsearch/api_configs.rb +++ b/lib/logstash/plugin_mixins/elasticsearch/api_configs.rb @@ -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 => [] }, diff --git a/spec/unit/outputs/error_whitelist_spec.rb b/spec/unit/outputs/error_whitelist_spec.rb index 910cc2d8..9780376f 100644 --- a/spec/unit/outputs/error_whitelist_spec.rb +++ b/spec/unit/outputs/error_whitelist_spec.rb @@ -25,7 +25,7 @@ "create" => { "status" => 409, "error" => { - "type" => "document_already_exists_exception", + "type" => "version_conflict_engine_exception", "reason" => "[shard] document already exists" } } @@ -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) From d2bae32111e11db0e80d4908f03e055ffae7514d Mon Sep 17 00:00:00 2001 From: Mirko Bez Date: Thu, 9 Nov 2023 17:06:12 +0100 Subject: [PATCH 2/2] Bump version of Plugin to version 11.20.1 --- CHANGELOG.md | 3 +++ logstash-output-elasticsearch.gemspec | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbc2d5aa..03193e26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/logstash-output-elasticsearch.gemspec b/logstash-output-elasticsearch.gemspec index 6f1bc777..3dd9b918 100644 --- a/logstash-output-elasticsearch.gemspec +++ b/logstash-output-elasticsearch.gemspec @@ -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"