lib/fluent/buffer.rb in fluentd-0.10.56 vs lib/fluent/buffer.rb in fluentd-0.10.57

- old
+ new

@@ -221,14 +221,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)