| 635 | } |
| 636 | |
| 637 | Status KrpcDataStreamSender::PartitionRowCollector::SendCurrentBatch() { |
| 638 | if (collector_batch_->IsEmpty()) { |
| 639 | DCHECK_EQ(num_rows_, 0); |
| 640 | return Status::OK(); |
| 641 | } |
| 642 | num_rows_ = 0; |
| 643 | RETURN_IF_ERROR(channel_->GetParent()->PrepareBatchForSend( |
| 644 | collector_batch_.get(), !channel_->IsLocal())); |
| 645 | RETURN_IF_ERROR(channel_->TransmitData(&collector_batch_, true /*swap_batch*/)); |
| 646 | collector_batch_->Reset(); |
| 647 | return Status::OK(); |
| 648 | } |
| 649 | |
| 650 | void KrpcDataStreamSender::Channel::EndDataStreamCompleteCb() { |
| 651 | std::unique_lock<SpinLock> l(lock_); |
no test coverage detected