From 4f06af8845e326c95ce046eb0a68fcce62fafb3b Mon Sep 17 00:00:00 2001 From: andsel Date: Fri, 6 Sep 2024 08:51:09 +0200 Subject: [PATCH 1/3] Use original_params to understand if user has customized the setting and not just on the value --- lib/logstash/codecs/json_lines.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logstash/codecs/json_lines.rb b/lib/logstash/codecs/json_lines.rb index ef63afc..c0a9795 100644 --- a/lib/logstash/codecs/json_lines.rb +++ b/lib/logstash/codecs/json_lines.rb @@ -57,7 +57,7 @@ class LogStash::Codecs::JSONLines < LogStash::Codecs::Base public def register - if decode_size_limit_bytes == DEFAULT_DECODE_SIZE_LIMIT_BYTES + if original_params['decode_size_limit_bytes'].nil? deprecation_logger.deprecated "The default value for `decode_size_limit_bytes`, currently at 512Mb, will be lowered in a future version to prevent Out of Memory errors from abnormally large messages or missing delimiters. Please set a value that reflects the largest expected message size (e.g. 20971520 for 20Mb)" end @buffer = FileWatch::BufferedTokenizer.new(@delimiter, @decode_size_limit_bytes) From d1df6942b6b320b97667c94de855465a86e110d0 Mon Sep 17 00:00:00 2001 From: andsel Date: Fri, 6 Sep 2024 08:53:27 +0200 Subject: [PATCH 2/3] Bumped new version --- CHANGELOG.md | 3 +++ logstash-codec-json_lines.gemspec | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ad1b8a..c681c1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 3.2.2 + - Fix: updated the way to check if the `decode_size_limit_bytes` has been explicitly customized. [#47](https://github.com/logstash-plugins/logstash-codec-json_lines/pull/47) + ## 3.2.1 - Raise the default value of `decode_size_limit_bytes` up to 512 MB. [#46](https://github.com/logstash-plugins/logstash-codec-json_lines/pull/46) diff --git a/logstash-codec-json_lines.gemspec b/logstash-codec-json_lines.gemspec index 9d73ce7..00a5a38 100644 --- a/logstash-codec-json_lines.gemspec +++ b/logstash-codec-json_lines.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'logstash-codec-json_lines' - s.version = '3.2.1' + s.version = '3.2.2' s.licenses = ['Apache License (2.0)'] s.summary = "Reads and writes newline-delimited JSON" 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" From 622decb910f6e6273f60f86f249d3d86ddf0f67f Mon Sep 17 00:00:00 2001 From: andsel Date: Fri, 6 Sep 2024 08:55:37 +0200 Subject: [PATCH 3/3] Minor, fixed typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c681c1b..9e69a7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## 3.2.2 - - Fix: updated the way to check if the `decode_size_limit_bytes` has been explicitly customized. [#47](https://github.com/logstash-plugins/logstash-codec-json_lines/pull/47) + - Fix: updated the way to check if the `decode_size_limit_bytes` has been explicitly customised. [#47](https://github.com/logstash-plugins/logstash-codec-json_lines/pull/47) ## 3.2.1 - Raise the default value of `decode_size_limit_bytes` up to 512 MB. [#46](https://github.com/logstash-plugins/logstash-codec-json_lines/pull/46)