| 346 | } |
| 347 | |
| 348 | inline 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 | |
| 361 | void KrpcDataStreamRecvr::SenderQueue::EnqueueDeferredRpc( |
| 362 | unique_ptr<TransmitDataCtx> payload) { |
nothing calls this directly
no test coverage detected