Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Not A Bug
-
Product Backlog
-
None
Description
When a DataStreamSender broadcasts batches it iterates over all the channels in the same order with all other senders. But SendBatch() will block, potentially blocking all N-1 senders, see code below.
In DataStreamSender::Send():
// SendBatch() will block if there are still in-flight rpcs (and those will // reference the previously written thrift batch) for (int i = 0; i < channels_.size(); ++i) { RETURN_IF_ERROR(channels_[i]->SendBatch(current_thrift_batch_)); }
That may lead to underutilization of resources, is not efficient nor scalable. We can improve it by for example shuffling the order of channels.