Csaba Ringhofer has uploaded this change for review. ( 
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
---
M be/src/runtime/krpc-data-stream-mgr.cc
1 file changed, 57 insertions(+), 41 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/51/22251/1
--
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: newchange
Gerrit-Change-Id: Ie110722f144400132de1e23813e260dab1de77e7
Gerrit-Change-Number: 22251
Gerrit-PatchSet: 1
Gerrit-Owner: Csaba Ringhofer <[email protected]>

Reply via email to