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 <[email protected]>
  • Loading branch information
amdoolittle authored and daipom committed Oct 31, 2023
1 parent e37785b commit 38f5650
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 38f5650

Please sign in to comment.