lib/fluent/buffer.rb in fluentd-0.12.0.pre.2 vs lib/fluent/buffer.rb in fluentd-0.12.0.pre.3

- old
+ new

@@ -235,14 +235,18 @@ @queue.size end def total_queued_chunk_size total = 0 - @map.each_value {|c| - total += c.size - } - @queue.each {|c| - total += c.size + synchronize { + @map.each_value {|c| + total += c.size + } + @queue.synchronize { + @queue.each {|c| + total += c.size + } + } } total end def new_chunk(key)