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



I'm a bit worried about this review:
- Requesting HRCs and Stages forces lazily loaded entities to be retrieved from 
the database. In large and/or cloud environments, this can lead to performance 
problems
- There are definite race conditions with this approach - concurrently 
executing tasks in a stage can step on each other's feet when altering the 
calculated status
- I actually don't see how the newly stored request status is being used - is 
there another Jira covering that?


ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java
 (lines 258 - 263)
<https://reviews.apache.org/r/53686/#comment225901>

    If two HRCs complete at the same time, they'll both try to update the same 
stage.



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java
 (lines 219 - 240)
<https://reviews.apache.org/r/53686/#comment225900>

    This isn't thread safe - with multiple concurrent states being reported, 
it's possible that one calculated state could override another one.


- Jonathan Hurley


On Nov. 11, 2016, 8:33 p.m., Jaimin Jetly wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53686/
> -----------------------------------------------------------
> 
> (Updated Nov. 11, 2016, 8:33 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18868
>     https://issues.apache.org/jira/browse/AMBARI-18868
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Stage and Request status should be persisted in the database.
> 
> upgrading to ambari-3.0.0 should add status for all present stages and 
> request for the cluster.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
>  2c87583 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java
>  3a86aef 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java
>  74271b9 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestEntity.java
>  b1aad00 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java
>  f9c8810 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog300.java
>  4f90ef3 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql 8cf2c0d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 37a9757 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 15d6120 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 5a82a52 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 659e4dc 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql e9a258a 
>   
> ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionDBAccessorImpl.java
>  1ca777d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
>  14e3d08 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProviderTest.java
>  baec7df 
>   
> ambari-server/src/test/java/org/apache/ambari/server/orm/dao/UpgradeDAOTest.java
>  cc49cbd 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/services/RetryUpgradeActionServiceTest.java
>  2fb57d7 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
>  d7979e8 
> 
> Diff: https://reviews.apache.org/r/53686/diff/
> 
> 
> Testing
> -------
> 
> Verified manually on a cluster by making api requests and upgrading ambari.
> Add unit tests.
> Jenkins job overall unit test result pending..
> 
> 
> Thanks,
> 
> Jaimin Jetly
> 
>

Reply via email to