----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58282/#review171405 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java Lines 615-618 (patched) <https://reviews.apache.org/r/58282/#comment244317> We can't use the list of stages for this anymore since it's not complete. Instead, we can have the database tell us which hosts have commands for a given request if needed. ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java Line 916 (original), 917-947 (patched) <https://reviews.apache.org/r/58282/#comment244318> Two new queries which can be used if there are concurrent requests in order to determine which hosts have commands which would block future requests for that host. ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java Lines 74-76 (patched) <https://reviews.apache.org/r/58282/#comment244320> Find all hosts with requests in progress ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java Lines 77-79 (patched) <https://reviews.apache.org/r/58282/#comment244319> Find every host which has a command in progress (which is not a background command) for any request before the specified one. - Jonathan Hurley On April 8, 2017, 3:19 p.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58282/ > ----------------------------------------------------------- > > (Updated April 8, 2017, 3:19 p.m.) > > > Review request for Ambari and Sumit Mohanty. > > > Bugs: AMBARI-20712 > https://issues.apache.org/jira/browse/AMBARI-20712 > > > Repository: ambari > > > Description > ------- > > AMBARI-20646 introduced a regression which can be seen when deploying a > cluster via blueprint with Kerberization. The problem is caused by the change > which was made to only pull in the most recent stage in progress per request. > > There was logic which prevented concurrently executing request stages to be > scheduled if a prior request had an un-executed stage with a conflicting > host. For example: > > - Request 1 > -- Stage 1 (IN_PROGRESS) > --- Host 1 > --- Host 2 > --- Host 3 > -- Stage 2 (PENDING) > --- Host 4 > > - Request 2 > -- Stage 1 > --- Host 4 > > In the above scenario, the scheduler was tricked into thinking that Request 2 > can run even though Host-4 has a conflict. This is because it was only > looking at the stage in progress. > > We can't simply look at all stages in progress since this would cause the > performance bug to manifest again. So, the solution is to have the database > tell us which hosts are blocking from prior requests. This SQL should be very > fast and will only run in the specific cases where there are multiple > concurrent requests (which is typically at blueprint time). > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java > 758db35 > > ambari-server/src/main/java/org/apache/ambari/server/actionmanager/HostRoleCommand.java > 651eb24 > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java > 77d5bf8 > > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java > 79b8bc9 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java > a809295 > ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql 6744a74 > ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 6279f83 > ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 470eb60 > ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 87ffb7f > ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql a460194 > ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 237c892 > > > Diff: https://reviews.apache.org/r/58282/diff/1/ > > > Testing > ------- > > PENDING > > > Thanks, > > Jonathan Hurley > >
