-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24948/#review52782
-----------------------------------------------------------



core/src/main/java/org/apache/oozie/BundleJobBean.java
<https://reviews.apache.org/r/24948/#comment91893>

    1) GET_BUNDLE_IDS_BY_LAST_MODIFIED_TIME -> GET_BUNDLE_IDS_FOR_STATUS_TRANSIT
    
    2) Either A or a through out. If any of the supported databases is 
case-sensitive it will be a problem.
    
    3) select distinct  instead of group by at the end
    
    4) Nitpick. spaces before and after = in w.id=a.bundleId



core/src/main/java/org/apache/oozie/CoordinatorJobBean.java
<https://reviews.apache.org/r/24948/#comment91894>

    1) GET_COORD_IDS_BY_LAST_MODIFIED_TIME -> GET_COORD_IDS_FOR_STATUS_TRANSIT
    
    2) distinct instead of group by
    
    3) join clause w.id = a.jobId is missing.



core/src/main/java/org/apache/oozie/ErrorCode.java
<https://reviews.apache.org/r/24948/#comment91896>

    Coord status transit error.



core/src/main/java/org/apache/oozie/ErrorCode.java
<https://reviews.apache.org/r/24948/#comment91897>

    Bundle status transit error



core/src/main/java/org/apache/oozie/command/StatusTransitXCommand.java
<https://reviews.apache.org/r/24948/#comment91904>

    0L



core/src/main/java/org/apache/oozie/command/StatusTransitXCommand.java
<https://reviews.apache.org/r/24948/#comment91905>

    jobStatus



core/src/main/java/org/apache/oozie/command/StatusTransitXCommand.java
<https://reviews.apache.org/r/24948/#comment92173>

    Current code will update status even if there is no change



core/src/main/java/org/apache/oozie/command/StatusTransitXCommand.java
<https://reviews.apache.org/r/24948/#comment92194>

    Though this method is very readable, understanding the full status transit 
logic is very hard and requires lot of hops between methods to read. Requires 
rework.



core/src/main/java/org/apache/oozie/command/bundle/BundleStatusTransitXCommand.java
<https://reviews.apache.org/r/24948/#comment92164>

    && bundleJob.getStatus() != Job.Status.KILLED needs to be removed



core/src/main/java/org/apache/oozie/command/bundle/BundleStatusTransitXCommand.java
<https://reviews.apache.org/r/24948/#comment92163>

    Remove variable and log directly



core/src/main/java/org/apache/oozie/command/coord/CoordStatusTransitXCommand.java
<https://reviews.apache.org/r/24948/#comment92165>

    Can we get delete CoordJobGetPendingActionsCountJPAExecutor and change to 
CoordJobQueryExecutor.getSingleValue. Refer to 
SLASummaryQueryExecutor.getSingleValue().



core/src/main/java/org/apache/oozie/service/StatusTransitService.java
<https://reviews.apache.org/r/24948/#comment92178>

    Get rid of these. Not actually used



core/src/main/java/org/apache/oozie/service/StatusTransitService.java
<https://reviews.apache.org/r/24948/#comment92179>

    Get rid of the hashset



core/src/main/java/org/apache/oozie/service/StatusTransitService.java
<https://reviews.apache.org/r/24948/#comment92180>

    merge this method into bundleTransit



core/src/main/java/org/apache/oozie/service/StatusTransitService.java
<https://reviews.apache.org/r/24948/#comment92181>

    merge this method into coordTransit



core/src/test/java/org/apache/oozie/service/TestStatusTransitService.java
<https://reviews.apache.org/r/24948/#comment92184>

    services = new Services();
    services.init();
    
    to avoid leaking services



core/src/test/java/org/apache/oozie/service/TestStatusTransitService.java
<https://reviews.apache.org/r/24948/#comment92186>

    JobLock. Why do you need a separate thread and class for acquiring and 
releasing locks?
    
    Can't you just do 
    
    LockToken lock = 
Services.get().get(MemoryLocksService.class).getWriteLock(jobId, 0);
    .....
    Perform operations
    .....
    lock.release();
    
    in the test methods


- Rohini Palaniswamy


On Sept. 8, 2014, 9:15 p.m., Purshotam Shah wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/24948/
> -----------------------------------------------------------
> 
> (Updated Sept. 8, 2014, 9:15 p.m.)
> 
> 
> Review request for oozie.
> 
> 
> Bugs: OOZIE-1940
>     https://issues.apache.org/jira/browse/OOZIE-1940
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> StatusTransitService has race condition
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/oozie/BundleActionBean.java 5d85a4d 
>   core/src/main/java/org/apache/oozie/BundleJobBean.java 0f1670a 
>   core/src/main/java/org/apache/oozie/CoordinatorActionBean.java 795bf63 
>   core/src/main/java/org/apache/oozie/CoordinatorJobBean.java 8fd53f1 
>   core/src/main/java/org/apache/oozie/ErrorCode.java 88a2c67 
>   core/src/main/java/org/apache/oozie/command/StatusTransitXCommand.java 
> e69de29 
>   
> core/src/main/java/org/apache/oozie/command/bundle/BundleStatusTransitXCommand.java
>  e69de29 
>   
> core/src/main/java/org/apache/oozie/command/coord/CoordStatusTransitXCommand.java
>  e69de29 
>   
> core/src/main/java/org/apache/oozie/executor/jpa/BundleJobQueryExecutor.java 
> 36cd968 
>   
> core/src/main/java/org/apache/oozie/executor/jpa/CoordActionQueryExecutor.java
>  3008393 
>   core/src/main/java/org/apache/oozie/executor/jpa/CoordJobQueryExecutor.java 
> 04e6e29 
>   core/src/main/java/org/apache/oozie/service/StatusTransitService.java 
> 21ac25f 
>   core/src/test/java/org/apache/oozie/service/TestStatusTransitService.java 
> bb99138 
> 
> Diff: https://reviews.apache.org/r/24948/diff/
> 
> 
> Testing
> -------
> 
> UTC
> 
> 
> Thanks,
> 
> Purshotam Shah
> 
>

Reply via email to