----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4842/#review7747 -----------------------------------------------------------
regarding the race condition scenario you mentioned, you are correct. I wonder what would be the correct way of doing it? * 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) trunk/core/src/main/java/org/apache/oozie/command/coord/CoordChangeXCommand.java <https://reviews.apache.org/r/4842/#comment17049> do we really need the loadAction/deleteAction methods or can we do this inline above? trunk/core/src/main/java/org/apache/oozie/executor/jpa/CoordJobGetActionByActionNumberJPAExecutor.java <https://reviews.apache.org/r/4842/#comment17050> This executor is missleading, it is returning a CoordinatorAction which only has it status set. Why not make it return the action status instead? (i know, this was not fully done in the JIRA, but his is nasty) - Alejandro On 2012-05-09 07:59:18, shwethags wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/4842/ > ----------------------------------------------------------- > > (Updated 2012-05-09 07:59:18) > > > Review request for oozie. > > > Summary > ------- > > 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 addresses bug OOZIE-818. > https://issues.apache.org/jira/browse/OOZIE-818 > > > Diffs > ----- > > trunk/core/src/main/java/org/apache/oozie/CoordinatorActionBean.java > 1335944 > trunk/core/src/main/java/org/apache/oozie/ErrorCode.java 1335944 > > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordChangeXCommand.java > 1335944 > > trunk/core/src/main/java/org/apache/oozie/executor/jpa/CoordJobGetActionByActionNumberJPAExecutor.java > 1335944 > > trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordChangeXCommand.java > 1335944 > > trunk/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobGetActionByActionNumberJPAExecutor.java > 1335944 > > Diff: https://reviews.apache.org/r/4842/diff > > > Testing > ------- > > UT - TestCoordChangeXCommand > > > Thanks, > > shwethags > >
