Skip to content

Commit

Permalink
Enqueue chunks in buffer.synchronize
Browse files Browse the repository at this point in the history
Chunks could be purged by buffer.purge
so buffer locks are required.
  • Loading branch information
abicky committed Oct 20, 2017
1 parent ed9f921 commit 723038c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/buffer.rb
Expand Up @@ -325,8 +325,8 @@ def enqueue_chunk(metadata)
synchronize do
@queue << chunk
@queued_num[metadata] = @queued_num.fetch(metadata, 0) + 1
chunk.enqueued!
end
chunk.enqueued!
end
end
bytesize = chunk.bytesize
Expand Down

0 comments on commit 723038c

Please sign in to comment.