[
https://issues.apache.org/jira/browse/OOZIE-818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13272153#comment-13272153
]
[email protected] commented on OOZIE-818:
-----------------------------------------------------
bq. On 2012-05-09 22:49:25, Alejandro Abdelnur wrote:
bq. > regarding the race condition scenario you mentioned, you are correct.
bq. >
bq. > I wonder what would be the correct way of doing it?
bq. >
bq. > * collect all action IDs to delete, obtain (oozie lock service) lock for
them, check status of all actions, then delete them, if lock cannot be acquired
or status does not match anymore, rollback. (But we should do this as part of
another JIRA)
bq. >
I have added a patch where the status check is done as part of delete sql. This
will work correctly for CoordChangeXCommand. But to solve the whole race
condition, even CoordActionReadyXCommand also has to be fixed.
As of now, CoordActionReadyXCommand loads list of ready actions and then
iterates through the actions calling CoordActionStartXCommand and update status
to SUBMITTED. Instead change CoordActionReadyXCommand to first update status of
all REDAY actions to SUBMITTED in one sql(update status = SUBMITTED where jobid
= <coordid> and status = READY with limit) and then iterate through SUBMITTED
actions and call CoordActionStartXCommand. Fixing CoordActionReadyXCommand can
be taken up in another jira.
Can we close this jira for just CoordChangeXCommand?
bq. On 2012-05-09 22:49:25, Alejandro Abdelnur wrote:
bq. >
trunk/core/src/main/java/org/apache/oozie/command/coord/CoordChangeXCommand.java,
line 244
bq. > <https://reviews.apache.org/r/4842/diff/3/?file=108016#file108016line244>
bq. >
bq. > do we really need the loadAction/deleteAction methods or can we do
this inline above?
Not really required. But if I make it inline, processLookaheadActions looks bad
- shwethags
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4842/#review7747
-----------------------------------------------------------
On 2012-05-10 06:41:33, shwethags wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/4842/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2012-05-10 06:41:33)
bq.
bq.
bq. Review request for oozie.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. CoordChangeXCommand.processLookaheadActions() doesn't use coord timeunit
while calculating the action times. So, if the frequency is non-minutes(hours,
days, months), setting pause time can delete past coord actions
bq.
bq.
bq. This addresses bug OOZIE-818.
bq. https://issues.apache.org/jira/browse/OOZIE-818
bq.
bq.
bq. Diffs
bq. -----
bq.
bq. trunk/core/src/main/java/org/apache/oozie/CoordinatorActionBean.java
1335944
bq. trunk/core/src/main/java/org/apache/oozie/ErrorCode.java 1335944
bq.
trunk/core/src/main/java/org/apache/oozie/command/coord/CoordChangeXCommand.java
1335944
bq.
trunk/core/src/main/java/org/apache/oozie/executor/jpa/CoordActionRemoveJPAExecutor.java
1335944
bq.
trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordChangeXCommand.java
1335944
bq.
trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordActionRemoveJPAExecutor.java
1335944
bq.
bq. Diff: https://reviews.apache.org/r/4842/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq. UT - TestCoordChangeXCommand
bq.
bq.
bq. Thanks,
bq.
bq. shwethags
bq.
bq.
> CoordChangeXCommand deletes past coordinator actions
> ----------------------------------------------------
>
> Key: OOZIE-818
> URL: https://issues.apache.org/jira/browse/OOZIE-818
> Project: Oozie
> Issue Type: Bug
> Reporter: Shwetha G S
> Assignee: Shwetha G S
> Priority: Critical
>
> CoordChangeXCommand.processLookaheadActions() doesn't use coord timeunit
> while calculating the action times. So, if the frequency is
> non-minutes(hours, days, months...), setting pause time can delete past coord
> actions
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira