----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53686/#review155819 -----------------------------------------------------------
Is this effort spanning multiple jira? I was hoping we would be able to optimize queries against the database if we need to recalculate status. When tasks are completed can we compute the status of the whole based on just the status of the single task (for any case)? Where is the update code for Stage being run (when we know a task's own status)? ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestEntity.java (lines 222 - 229) <https://reviews.apache.org/r/53686/#comment225908> This is iterating Stages won't be performant when the number of stages is huge. When does this call happen during Task response processing? ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java (lines 214 - 216) <https://reviews.apache.org/r/53686/#comment225912> There's now 2 places to set state (update method and set), so if it's set directly, how does that impact the Tasks? Should we not allow setting status of a Stage like this? ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java (lines 226 - 230) <https://reviews.apache.org/r/53686/#comment225909> Won't be performant on large numbers of tasks (like during upgrade). - Nate Cole 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 > >