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

Satish Mittal commented on OOZIE-1831:
--------------------------------------

[~rkanter], The original method postUpgradeTasks() was executing many SQL 
queries to update coord job/actions status. I checked with [~rohini] and she 
mentioned that UPDATE_DELIMITER_VER_TWO is required for 3.x to 4.x upgrade. But 
COORD_JOBS_THROTTLING_DEFAULT, COORD_JOBS_ADD_APP_NAMESPACE, 
COORD_JOBS_STATUS_1/COORD_ACTIONS_STATUS should not be executed which are for 
old releases and may cause undesired behavior. We didn't want to remove the 
original method, but just avoid the unwanted updates. Hence created a separate 
method postUpgradeTasksFor40() moving out UPDATE_DELIMITER_VER_TWO code into 
that and use that.

> Oozie upgrade fails if workflow jobs are in running or suspended state
> ----------------------------------------------------------------------
>
>                 Key: OOZIE-1831
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1831
>             Project: Oozie
>          Issue Type: Bug
>          Components: tools
>    Affects Versions: 4.1.0
>            Reporter: Satish Mittal
>            Assignee: Satish Mittal
>             Fix For: 4.1.0
>
>         Attachments: OOZIE-1831.patch.txt
>
>
> While upgrading oozie from 3.x to trunk, oozie upgrade fails if there any 
> workflow jobs found in running or suspended state:
> {noformat}
> Error: There are [26] workflows in RUNNING/SUSPENDED state, they must 
> complete or be killed
> Stack trace for the error was (for debug purposes):
> --------------------------------------
> java.lang.Exception: There are [26] workflows in RUNNING/SUSPENDED state, 
> they must complete or be killed
>       at org.apache.oozie.tools.OozieDBCLI.verifyDBState(OozieDBCLI.java:992)
>       at org.apache.oozie.tools.OozieDBCLI.upgradeDB(OozieDBCLI.java:197)
>       at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:128)
>       at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:76)
> {noformat}
> This check seems unnecessary. It may not be possible to ensure in production 
> that no workflows are in running/suspended state before upgrade.
> Also current upgrade code updates the status of coord jobs/coord actions in 
> DB. This may not be required now.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to