mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
MINOR+PERFORMANCE: Cleanup constructor of WrappedSynchronousQueue::ReadBatch
Fixes #8433
This commit is contained in:
parent
b651f30f99
commit
cdbcbe0472
1 changed files with 1 additions and 6 deletions
|
@ -156,17 +156,12 @@ module LogStash; module Util
|
|||
|
||||
class ReadBatch
|
||||
def initialize(queue, size, wait)
|
||||
@queue = queue.queue
|
||||
@size = size
|
||||
@wait = wait
|
||||
|
||||
# TODO: disabled for https://github.com/elastic/logstash/issues/6055 - will have to properly refactor
|
||||
# @cancelled = Hash.new
|
||||
|
||||
#Sizing HashSet to size/load_factor to ensure no rehashing
|
||||
@is_iterating = false # Atomic Boolean maybe? Although batches are not shared across threads
|
||||
@acked_batch = nil
|
||||
@originals = LsQueueUtils.drain(@queue, @size, @wait)
|
||||
@originals = LsQueueUtils.drain(queue.queue, size, wait)
|
||||
end
|
||||
|
||||
def merge(event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue