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-12178 - Memory Exhausted During Upgrade Of Large Cluster (part2) (jonathanhurley)
Date Sat, 27 Jun 2015 22:38:59 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 401e8f3df -> 19eab7af0


AMBARI-12178 - Memory Exhausted During Upgrade Of Large Cluster (part2) (jonathanhurley)


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

Branch: refs/heads/branch-2.1
Commit: 19eab7af0170215a5d0c01024f6e732c67625c3f
Parents: 401e8f3
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Sat Jun 27 18:37:57 2015 -0400
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Sat Jun 27 18:38:52 2015 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/ambari/server/orm/dao/StageDAO.java | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/19eab7af/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java
index 4b0056e..83c2c44 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java
@@ -42,6 +42,8 @@ import org.apache.ambari.server.orm.entities.StageEntity;
 import org.apache.ambari.server.orm.entities.StageEntityPK;
 import org.apache.ambari.server.orm.entities.StageEntity_;
 import org.apache.ambari.server.utils.StageUtils;
+import org.eclipse.persistence.config.HintValues;
+import org.eclipse.persistence.config.QueryHints;
 
 import com.google.inject.Inject;
 import com.google.inject.Provider;
@@ -206,6 +208,12 @@ public class StageDAO {
     query.orderBy(sortOrders);
 
     TypedQuery<StageEntity> typedQuery = entityManager.createQuery(query);
+
+    // !!! https://bugs.eclipse.org/bugs/show_bug.cgi?id=398067
+    // ensure that an associated entity with a JOIN is not stale; this causes
+    // the associated StageEntity to be stale
+    typedQuery.setHint(QueryHints.REFRESH, HintValues.TRUE);
+
     return daoUtils.selectList(typedQuery);
   }
 


Mime
View raw message