Skip to content

Commit 5f5333c

Browse files
committed
out_opensearch_data_stream: Early return on empty body
Due to some reason the body could be empty which results in infinite jumps between failed buffer flushes. Opensearch returns a 400 with "request body is required". Signed-off-by: Tim Foerster <tim.foerster@hetzner.com>
1 parent 0762b3f commit 5f5333c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/fluent/plugin/out_opensearch_data_stream.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ def write(chunk)
201201
end
202202
end
203203

204+
return if bulk_message.to_s.empty?
205+
204206
params = {
205207
index: data_stream_name,
206208
body: bulk_message

0 commit comments

Comments
 (0)