Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/22251 )

Change subject: IMPALA-13630: Avoid holding global lock when closing 
KrpcDataStreamRecvr
......................................................................

IMPALA-13630: Avoid holding global lock when closing KrpcDataStreamRecvr

KrpcDataStreamRecvr::CancelStream() may take some time as it:
- may need to wait for SenderQueue's lock
- needs to respond all deferred RPCs

While responding RPCs is asynchronous, it still involves serialization
of the response and a potential system call to schedule the response to
the KRPC reactor thread.

The change is safe as all KrpcDataStreamRecvr::SenderQueue functions
check cancallation and return fast if it is already cancelled. Calling
CancelStream() twice (once in DeregisterRecvr(), once in Cancel()) is
also harmless.

Change-Id: Ie110722f144400132de1e23813e260dab1de77e7
Reviewed-on: http://gerrit.cloudera.org:8080/22251
Reviewed-by: Michael Smith <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M be/src/runtime/krpc-data-stream-mgr.cc
1 file changed, 57 insertions(+), 41 deletions(-)

Approvals:
  Michael Smith: Looks good to me, approved
  Impala Public Jenkins: Verified

--
To view, visit http://gerrit.cloudera.org:8080/22251
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie110722f144400132de1e23813e260dab1de77e7
Gerrit-Change-Number: 22251
Gerrit-PatchSet: 4
Gerrit-Owner: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>

Reply via email to