Skip to content

Commit

Permalink
add comment about splitting event stream to write into buffer chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
tagomoris committed Jul 19, 2016
1 parent 433b34c commit fe3a860
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/fluent/plugin/buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,11 @@ def write_once(metadata, data, format: nil, size: nil, &block)

unless stored
# try step-by-step appending if data can't be stored into existing a chunk in non-bulk mode
#
# 1/10 size of original event stream (splits_count == 10) seems enough small
# to try emitting events into existing chunk.
# it does not matter to split event stream into very small splits, because chunks have less
# overhead to write data many times (even about file buffer chunks).
write_step_by_step(metadata, data, format, 10, &block)
end
rescue ShouldRetry
Expand Down

0 comments on commit fe3a860

Please sign in to comment.