MCPcopy Create free account
hub / github.com/apache/impala / CanEnqueue

Method CanEnqueue

be/src/runtime/krpc-data-stream-recvr.cc:348–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348inline bool KrpcDataStreamRecvr::SenderQueue::CanEnqueue(int64_t batch_size) const {
349 lock_.DCheckLocked();
350 // The queue is truly empty iff there is no pending insert. It's important that we
351 // enqueue the new batch regardless of buffer limit if the queue is currently empty.
352 // In the case of a merging receiver, batches are received from a specific queue
353 // based on data order, and the pipeline will stall if the merger is waiting for data
354 // from an empty queue that cannot be filled because the limit has been reached.
355 bool queue_empty = batch_queue_.empty()
356 && num_pending_enqueue_ == 0 && num_deserialize_tasks_pending_ == 0;
357 bool result = queue_empty || !ExceedsLimit(batch_size);
358 return result;
359}
360
361void KrpcDataStreamRecvr::SenderQueue::EnqueueDeferredRpc(
362 unique_ptr<TransmitDataCtx> payload) {

Callers

nothing calls this directly

Calls 2

DCheckLockedMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected