Skip to content

Commit

Permalink
out_opensearch_data_stream: Early return on empty body
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
tonobo committed Mar 6, 2024
1 parent 0762b3f commit 146f71d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/fluent/plugin/out_opensearch_data_stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ def write(chunk)
end
end

return if bulk_message.to_s.empty?

params = {
index: data_stream_name,
body: bulk_message
Expand Down

0 comments on commit 146f71d

Please sign in to comment.