elasticsearch-java icon indicating copy to clipboard operation
elasticsearch-java copied to clipboard

Logstash Pipeline settings builder generates invalid values for logstash pipeline queues

Open robbavey opened this issue 2 years ago • 1 comments

Java API client version

All versions of 8.x, since at least 7.15

Java version

Any

Elasticsearch Version

All versions of 8.x, since at least 7.15

Problem description

The logstash builder has methods queueMaxBytesNumber and queueMaxBytesUnits, which serializes as

https://github.com/elastic/elasticsearch-java/blob/main/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/PipelineSettings.java#L159-L163

queue.max_bytes.number and queue.max_bytes.units, which are not valid logstash pipeline settings, and generate the following warnings when logstash starts up:

{"level":"WARN","loggerName":"logstash.configmanagement.elasticsearchsource","timeMillis":1692039467779,"thread":"Agent thread","logEvent":{"message":"Ignoring unsupported or unknown pipeline settings 'queue.max_bytes.number'"}}
{"level":"WARN","loggerName":"logstash.configmanagement.elasticsearchsource","timeMillis":1692039467779,"thread":"Agent thread","logEvent":{"message":"Ignoring unsupported or unknown pipeline settings 'queue.max_bytes.units'"}}

Additionally, the correct value of queue.max_bytes - which is a concatenated version of the two values (eg 1024mb) is not serialized, meaning that the disk queue cannot be set using this method

robbavey avatar Aug 21 '23 21:08 robbavey

Related context in an Elasticsearch docs fix that landed in 7.17 and 8.6: https://github.com/elastic/elasticsearch/pull/92651

yaauie avatar Aug 22 '23 14:08 yaauie