----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58228/#review171264 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java Lines 259 (patched) <https://reviews.apache.org/r/58228/#comment244161> Technically, we should call this endRow since it's allowed to be the size of the collection. ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java Lines 273 (patched) <https://reviews.apache.org/r/58228/#comment244162> Java doc ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java Lines 306 (patched) <https://reviews.apache.org/r/58228/#comment244164> From my experience, I've seen several cases where deleting records from the execution command, HRC, stage, request, etc. table also requires deleting records from the toplogy* tables. Otherwise, Ambari still thinks that the cluster is still being deployed via blueprints and causes a lot of problems with configs. Have you tested this in actual clusters deployed via BP and that have undergone EU/RU? - Alejandro Fernandez On April 6, 2017, 11:05 p.m., Vitalyi Brodetskyi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58228/ > ----------------------------------------------------------- > > (Updated April 6, 2017, 11:05 p.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav > Papirkovskyy, and Sid Wagle. > > > Bugs: AMBARI-20687 > https://issues.apache.org/jira/browse/AMBARI-20687 > > > Repository: ambari > > > Description > ------- > > Add check for large tables into db consistency check. > Add code to cleanup these tables into db-cleanup code. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java > e7e9433 > ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java > c132a3d > > ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java > 1dd3b54 > > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java > 79b8bc9 > > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java > 2696f66 > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java > c2919b2 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ExecutionCommandEntity.java > 85f3a25 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java > a809295 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestEntity.java > f19aa72 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestOperationLevelEntity.java > ff14e3a > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestResourceFilterEntity.java > 8ee41d2 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RoleSuccessCriteriaEntity.java > 3386c24 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java > d035729 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/TopologyHostRequestEntity.java > b90e192 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/TopologyLogicalTaskEntity.java > c71d4e4 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java > 89574bc > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeItemEntity.java > 560970a > ambari-server/src/main/python/ambari-server.py 87cc6c2 > ambari-server/src/main/python/ambari_server/dbCleanup.py abc8267 > > ambari-server/src/test/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelperTest.java > 7d8ba50 > > > Diff: https://reviews.apache.org/r/58228/diff/3/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Vitalyi Brodetskyi > >