----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51629/#review147849 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java (line 332) <https://reviews.apache.org/r/51629/#comment215132> Although this query works, this has a dependency on host table. So what if the hosts table is clean and only hostcomponentstate has inconsistency? IMO, self join would be safest bet to find discrepancy. - Sid Wagle On Sept. 6, 2016, 12:06 p.m., Vitalyi Brodetskyi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51629/ > ----------------------------------------------------------- > > (Updated Sept. 6, 2016, 12:06 p.m.) > > > Review request for Ambari, Andrew Onischuk, Dmytro Sen, and Sid Wagle. > > > Bugs: AMBARI-18309 > https://issues.apache.org/jira/browse/AMBARI-18309 > > > Repository: ambari > > > Description > ------- > > Add db consistency check for hostcomponent tables, for each component we > should have only one state. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java > f302b8b > > ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyChecker.java > 535d74f > > ambari-server/src/test/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelperTest.java > 4663310 > > Diff: https://reviews.apache.org/r/51629/diff/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Vitalyi Brodetskyi > >