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:14 GMT
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 <jhurley@hortonworks.com>
Authored: Mon Feb 29 17:24:37 2016 -0500
Committer: Jonathan Hurley <jhurley@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);


Mime
View raw message