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

Zhihua Deng commented on HIVE-23727:
------------------------------------

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, The driver::close has done the case 
when the operation being canceled or timeout,  and there is no need to close 
the operation being closed, finished or failed(error). The operation being 
running is the only case the canceling background will take effect, but the 
operation can be treated as the timeout operation(cause they are running 
operation before timeout), which would finally cleanup by calling driver::close.

> 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: Minor
>              Labels: pull-request-available
>          Time Spent: 10m
>  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)

Reply via email to