Hello Michael Smith, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/21579

to look at the new patch set (#8).

Change subject: POC: Add queuing to broadcast data sender
......................................................................

POC: Add queuing to broadcast data sender

Before this patch KrpcDataStreamSender handled 2 batches
per channel:
1. serialization batch (not ready for send)
2. in-fligh batch (with current active RPC)

If the in-flight batch was not finished till serialization finished,
then the sender blocked. This means that all RPCs were initiated
from the fragment instance thread (with the exception of repeated
ones on errors).

To provide deeper queue the main challenge is to send the next batch
in queue immidiately once the in-flight RPC finished, which can't be
done from the fragment instance thread which may be busy somewhere
else. The solution is to keep a queue of ready-to-send batches
(OutboundQueue) and dispatch the next batch in the callback of
last successful TransmitData (TransmitDataCompleteCb(), similarly to
how repeated RPCs were handled). This happens on KRPC reactor thread
so should not do significant work or block.

Besided sending next TransmitData, EndDataStream is also sent during
TransmitDataCompleteCb in case of EOS to notify the receiver quicker
without waiting other receivers to consume their batches.

This patch implements a queue with fixed size of 2 for non-partitioned
exchanges. This needs efficient handling of broadcasts: channels
share the same OutboundQueue but can progress with the batches in the
queue independently.

Queue capacity is enforced by KrpcDataStreamSender::WaitForCapacity().
This will block after returning 2 batches till ReleaseBatch() is
called from OutboundQueue. This is designed for the future partitioned
case which will use multiple queues with shared capacity. Buffers of
released batches are reuesed to avoid extra cross thread allocations/
deletes (allocation on fragment instance thread, free on reactor
thread).

Change-Id: Ibe3d01fada31f1b48de6c1403e7d2955114d8078
---
M be/src/runtime/krpc-data-stream-sender.cc
M be/src/runtime/krpc-data-stream-sender.h
2 files changed, 470 insertions(+), 39 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/79/21579/8
-- 
To view, visit http://gerrit.cloudera.org:8080/21579
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibe3d01fada31f1b48de6c1403e7d2955114d8078
Gerrit-Change-Number: 21579
Gerrit-PatchSet: 8
Gerrit-Owner: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>

Reply via email to