Skip to content

Commit

Permalink
Delete empty queued_num field after purging chunks
Browse files Browse the repository at this point in the history
This should fix the memory-leak bug described in fluent#1918.
  • Loading branch information
eagletmt committed Apr 2, 2018
1 parent 39d6911 commit b13cb0c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/fluent/plugin/buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ def purge_chunk(chunk_id)

if metadata && !@stage[metadata] && (!@queued_num[metadata] || @queued_num[metadata] < 1)
@metadata_list.delete(metadata)
@queued_num.delete(metadata)
end
log.trace "chunk purged", instance: self.object_id, chunk_id: dump_unique_id_hex(chunk_id), metadata: metadata
end
Expand Down

0 comments on commit b13cb0c

Please sign in to comment.