Method: Fluent::Plugin::Buffer#enqueue_unstaged_chunk

Defined in:
lib/fluent/plugin/buffer.rb

#enqueue_unstaged_chunk(chunk) ⇒ Object



506
507
508
509
510
511
512
513
514
515
516
517
518
519
# File 'lib/fluent/plugin/buffer.rb', line 506

def enqueue_unstaged_chunk(chunk)
  log.on_trace { log.trace "enqueueing unstaged chunk", instance: self.object_id, metadata: chunk. }

  synchronize do
    chunk.synchronize do
       = chunk.
      .seq = 0 # metadata.seq should be 0 for counting @queued_num
      @queue << chunk
      @queued_num[] = @queued_num.fetch(, 0) + 1
      chunk.enqueued!
    end
    @queue_size_metrics.add(chunk.bytesize)
  end
end