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




core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java
Lines 221 (patched)
<https://reviews.apache.org/r/58406/#comment245252>

    Please move this inside synchronized block on line below to get consistent 
view of slaCalc object across threads. Adjust the code inside 
checkAndUpdateSLACalcAfterRestart-->updateSLARegistartion accordingly. We don't 
need the synchronized block in updateSLARegistartion then.



core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java
Line 250 (original), 234 (patched)
<https://reviews.apache.org/r/58406/#comment245256>

    Do we need else condition similar to that line 265?
    
    ```
    else{
     if (firstCheckAfterRetstart) {
                                   slaCalc.setSLARegistrationBean(null);
            }
    }
    ```



core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java
Line 476 (original), 464 (patched)
<https://reviews.apache.org/r/58406/#comment245258>

    Need to wrap the call to checkAndUpdateSLACalcAfterRestart in 
synchronized(slaCalc) {} with the changes I suggested regarding synchronized 
block on line 221.



core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java
Lines 657 (patched)
<https://reviews.apache.org/r/58406/#comment245259>

    No need to check slaCalc.getSLARegistrationBean() == null here, inside 
synchronized(slaCalc) we are doing it.



core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java
Lines 147 (patched)
<https://reviews.apache.org/r/58406/#comment245261>

    Instead of explicity calling updateAllSlaStatus(), could you please have 
something like ```waitFor(SomePredicate){}``` ?


- Satish Saley


On April 14, 2017, 3:41 p.m., Purshotam Shah wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58406/
> -----------------------------------------------------------
> 
> (Updated April 14, 2017, 3:41 p.m.)
> 
> 
> Review request for oozie.
> 
> 
> Bugs: OOZIE-2863
>     https://issues.apache.org/jira/browse/OOZIE-2863
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> SLACalculatorMemory.loadOnRestart causing delay in server start
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/oozie/sla/SLACalcStatus.java 3a76dfe6 
>   core/src/main/java/org/apache/oozie/sla/SLACalculatorMemory.java 347f8537 
>   core/src/test/java/org/apache/oozie/service/TestHASLAService.java 3af263e1 
>   core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java 
> 559e2b31 
> 
> 
> Diff: https://reviews.apache.org/r/58406/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Purshotam Shah
> 
>

Reply via email to