ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: AMBARI-15173 - Express Upgrade Stuck At Manual Prompt Due To HRC Status Calculation Cache Problem (part4) (jonathanhurley)
Date Mon, 29 Feb 2016 22:25:45 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 0d933837e -> 397ac16dc


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/397ac16d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/397ac16d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/397ac16d

Branch: refs/heads/branch-2.2
Commit: 397ac16dcdd975406d85dbf25cc30f191a3ca461
Parents: 0d93383
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Mon Feb 29 17:24:37 2016 -0500
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Mon Feb 29 17:25:35 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/397ac16d/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 7a54d27..d462090 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);


Mime
View raw message