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

Zhihua Deng edited comment on HIVE-23727 at 6/19/20, 1:35 PM:
--------------------------------------------------------------

Fix: the state can only be one of canceled, closed, timeout passed to the 
method cleanup, so we have no idea of the state the operation holds now, 
perhaps any one of the state with order is greater or equal to pending, so 
cannot just use _if (shouldRunAsync() && state == OperationState.PENDING)_ 
here, but the pending state should be carefully deal with, otherwise we may see 
npe somewhere.


was (Author: dengzh):
Fix: the state can only be one of pending, closed, timeout passed to cleanup, 
so we have no idea of the state the operation holds now, perhaps any one of the 
state with order is greater or equal to pending, so cannot just use _if 
(shouldRunAsync() && state == OperationState.PENDING)_ here, but the pending 
state should be carefully deal with, otherwise we may see npe somewhere.

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