Skip to content

Commit

Permalink
Buffer: Fix NoMethodError with empty unstaged chunk arrays (fluent#4303)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Doolittle <alex_doolittle@uhaul.com>
  • Loading branch information
amdoolittle committed Oct 31, 2023
1 parent 52e46f0 commit 36220e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def write(metadata_and_data, format: nil, size: nil, enqueue: false)
if c.staged? && (enqueue || chunk_size_full?(c))
m = c.metadata
enqueue_chunk(m)
if unstaged_chunks[m]
if unstaged_chunks[m] && !unstaged_chunks[m].empty?
u = unstaged_chunks[m].pop
u.synchronize do
if u.unstaged? && !chunk_size_full?(u)
Expand Down

0 comments on commit 36220e5

Please sign in to comment.