[ 
https://issues.apache.org/jira/browse/OOZIE-1449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Kanter updated OOZIE-1449:
---------------------------------

    Attachment: OOZIE-1449.patch

There aren't that many actual changes in the patch; it was mostly just moving 
some tests around and fixing some tests that were incorrect.  
The important changes are:
- in {{XDataTestCase}} where it was using the coordinator job id as the parent 
id for a workflow instead of using the coordinator action id
- added two new queries to {{WorkflowJobBean}} and split 
{{WorkflowJobsCountNotForPurgeFromParentIdJPAExecutor}} and 
{{WorkflowJobsGetFromParentIdJPAExecutor}} each into two similar classes.  When 
the parent is a workflow, the id to use is exactly the parent workflow job id, 
so that's essentially the same as before; when the parent is a coordinator, the 
id to use only starts with the parent coordinator job id, so its a slightly 
different query (coordinator action ids start with their job's id: 
{{0000004-130709155224435-oozie-rkan-C@1}})
- updated {{PurgeXCommand}} to use the new JPAExecutors with the corrected 
queries

There should be 4 lines that are too long because they are {{@namedQuery}} 
changes
                
> Coordinator Workflow parent relationship is broken for purge service
> --------------------------------------------------------------------
>
>                 Key: OOZIE-1449
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1449
>             Project: Oozie
>          Issue Type: Bug
>          Components: core
>    Affects Versions: trunk
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>            Priority: Critical
>             Fix For: trunk
>
>         Attachments: OOZIE-1449.patch
>
>
> OOZIE-1118 improved the logic of the purge service to take into account the 
> parent-child relationships of bundle, coordinator, workflow, and subworkflow 
> jobs.  However, in queries (and test code) dealing with the coordinator 
> parent of a workflow, it is incorrectly using the coordinator job id instead 
> of the coordinator action id.  
> This means that the purging logic won't properly associate workflows with 
> their parent coordinators; all jobs should eventually be purged, so its not 
> completely broken, but it is currently possible for child workflows to be 
> purged before their coordinator parents (the correct behavior is for no child 
> or parent to be purged until the parent and all children are ready).  
> This doesn't affect the coordinator-bundle or subworkflow-workflow 
> relationships because they use their parent is the job id not the action id; 
> only the workflow-coordinator relationship uses the coordinator action id as 
> the parent id for the workflow job.

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