Remove extra query in transfer queue processor if queue is empty
Do not notify the transfer queue processor if we read fewer tasks than the batch size,
since this means that we know the queue is empty.
@@ -221,9 +221,11 @@ func (t *transferQueueProcessorImpl) processTransferTasks(tasksCh chan<- *persis
tasksCh <- tsk
}
+ if len(tasks) == transferTaskBatchSize {
// There might be more task
// We return now to yield, but enqueue an event to poll later
t.NotifyNewTask()
+ }
return
}
