[ 
https://issues.apache.org/jira/browse/IMPALA-13630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18067228#comment-18067228
 ] 

ASF subversion and git services commented on IMPALA-13630:
----------------------------------------------------------

Commit 17b8e5a933c073505356ffc4f843f488ad06a9f9 in impala's branch 
refs/heads/master from Csaba Ringhofer
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=17b8e5a93 ]

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]>


> Don't hold KrpcDataStreamMgr::lock_ during CancelStream()
> ---------------------------------------------------------
>
>                 Key: IMPALA-13630
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13630
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>            Reporter: Csaba Ringhofer
>            Priority: Major
>
> KrpcDataStreamMgr::Cancel()/KrpcDataStreamMgr::DeregisterRecvr() holds this 
> global lock during the whole operation. KrpcDataStreamRecvr::CancelStream() 
> may take some time to complete if it needs to wait for lock or there are a 
> large number of deferred rpcs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to