You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2016/02/29 23:25:14 UTC

ambari git commit: AMBARI-15173 - Express Upgrade Stuck At Manual Prompt Due To HRC Status Calculation Cache Problem (part4) (jonathanhurley)

Repository: ambari
Updated Branches:
  refs/heads/trunk 8d38f1638 -> 7abe374dd


AMBARI-15173 - Express Upgrade Stuck At Manual Prompt Due To HRC Status Calculation Cache Problem (part4) (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7abe374d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7abe374d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7abe374d

Branch: refs/heads/trunk
Commit: 7abe374dd5375f908514a0e4c266e661d6b20298
Parents: 8d38f16
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Mon Feb 29 17:24:37 2016 -0500
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Mon Feb 29 17:24:44 2016 -0500

----------------------------------------------------------------------
 .../apache/ambari/server/orm/dao/HostRoleCommandDAO.java  | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7abe374d/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
index c256066..14dac79 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
@@ -634,7 +634,15 @@ public class HostRoleCommandDAO {
       entity = entityManager.merge(entity);
       managedList.add(entity);
 
-      requestsToInvalidate.add(entity.getRequestId());
+      Long requestId = entity.getRequestId();
+      if (requestId == null) {
+        StageEntity stageEntity = entity.getStage();
+        if (stageEntity != null) {
+          requestId = stageEntity.getRequestId();
+        }
+      }
+
+      requestsToInvalidate.add(requestId);
     }
 
     invalidateHostRoleCommandStatusSummaryCache(requestsToInvalidate);