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

Virag Kothari commented on OOZIE-1202:
--------------------------------------

Seems the verifyPrecondition for action is required so that parent workflow job 
is not in inconsistent state.
The WorkflowJobkillX tries to set the action status to KILLED in db and queues 
the ActionKillXCommand. In a case, where wfjobKillX fails to execute the db 
operation, it may happen that the job and action are never set to KillED state 
by wfJobX. Now, if the ActionKillX is allowed to execute it may set the action 
state to KILLED but the wf job may remain in NON-KILLED status
                
> ActionKillXCommand precondition is wrong
> ----------------------------------------
>
>                 Key: OOZIE-1202
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1202
>             Project: Oozie
>          Issue Type: Bug
>          Components: action
>    Affects Versions: trunk
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>             Fix For: trunk
>
>         Attachments: OOZIE-1202.patch
>
>
> The {{ActionKillXCommand}}, which kills actions, has the following 
> precondition:
> {code}
> protected void verifyPrecondition() throws CommandException, 
> PreconditionException {
>     if (wfAction.getStatus() != WorkflowActionBean.Status.KILLED) {
>         throw new PreconditionException(ErrorCode.E0726, wfAction.getId());
>     }
> }
> {code}
> This means that if the only way to pass the precondition is for the action to 
> already have been KILLED, which is backwards.  We want the precondition to 
> pass only when the action has not already been KILLED.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to