Skip to content

Commit

Permalink
buffer: Fix log message for chunk_limit_records case. fix #3072
Browse files Browse the repository at this point in the history
Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
  • Loading branch information
repeatedly committed Jul 21, 2020
1 parent b03ee59 commit e80d532
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/fluent/plugin/buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,11 @@ def write_once(metadata, data, format: nil, size: nil, &block)

if chunk_size_over?(chunk)
if format && empty_chunk
log.warn "chunk bytes limit exceeds for an emitted event stream: #{adding_bytesize}bytes"
if chunk.bytesize > @chunk_limit_size
log.warn "chunk bytes limit exceeds for an emitted event stream: #{adding_bytesize}bytes"
else
log.warn "chunk size limit exceeds for an emitted event stream: #{chunk.size}records"
end
end
chunk.rollback

Expand Down

0 comments on commit e80d532

Please sign in to comment.