hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhihua Deng (Jira)" <j...@apache.org>
Subject [jira] [Comment Edited] (HIVE-23727) Improve SQLOperation log handling when cleanup
Date Mon, 22 Jun 2020 03:02:00 GMT

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

Zhihua Deng edited comment on HIVE-23727 at 6/22/20, 3:01 AM:
--------------------------------------------------------------

I'm wondering if we can improve the whole branch ```_if (shouldRunAsync() && state
!= OperationState.CANCELED && state != OperationState.TIMEDOUT)_ ``` here.  The
codes make some confusing to me, as if the driver::close has done the case when the operation
being canceled or timeout and there is no need to cancel the backgound of the operation being
closed, finished or failed(error). The cases that the canceling background will take effect
are operations being RUNNING and PENDING(_state=__OperationState._CLOSED is passed to _cleanup,
ctrl + c)_ but canceling the background of a running operation can be treated as the timeout
operation(cause they are running operation before timeout).


was (Author: dengzh):
I'm wondering if we can remove the whole branch ```_if (shouldRunAsync() && state
!= OperationState.CANCELED && state != OperationState.TIMEDOUT)_ ``` here.  The
codes make some confusing to me, as if the driver::close has done the case when the operation
being canceled or timeout and there is no need to cancel the backgound of the operation being
closed, finished or failed(error). The cases that the canceling background will take effect
are operations being RUNNING and PENDING(_state=__OperationState._CLOSED is passed to _cleanup,
ctrl + c)_ but canceling the background of a running operation can be treated as the timeout
operation(cause they are running operation before timeout).

> Improve SQLOperation log handling when cleanup
> ----------------------------------------------
>
>                 Key: HIVE-23727
>                 URL: https://issues.apache.org/jira/browse/HIVE-23727
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Zhihua Deng
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The SQLOperation checks _if (shouldRunAsync() && state != OperationState.CANCELED
&& state != OperationState.TIMEDOUT)_ to cancel the background task. If true, the
state should not be OperationState.CANCELED, so logging under the state == OperationState.CANCELED
should never happen.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message