[
https://issues.apache.org/jira/browse/AMBARI-20672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15955949#comment-15955949
]
Hudson commented on AMBARI-20672:
---------------------------------
FAILURE: Integrated in Jenkins build Ambari-trunk-Commit #7237 (See
[https://builds.apache.org/job/Ambari-trunk-Commit/7237/])
AMBARI-20672 - Cluster Merge At End Of Upgrade Creation Cascades (jhurley:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=8c2ff91c7c632d01c35dec160b0debdab730ca82])
* (edit)
ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java
> Cluster Merge At End Of Upgrade Creation Cascades Unnecessarily
> ---------------------------------------------------------------
>
> Key: AMBARI-20672
> URL: https://issues.apache.org/jira/browse/AMBARI-20672
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Affects Versions: 2.4.2
> Reporter: Jonathan Hurley
> Assignee: Jonathan Hurley
> Priority: Critical
> Fix For: 2.5.1
>
> Attachments: AMBARI-20672.patch
>
>
> During the creation of an upgrade, an association is made between the
> ClusterEntity and the UpgradeEntity so that determining if an upgrade is in
> progress can be fast.
> {code}
> upgradeEntity.setRequestId(request.getId());
> request.persist();
> s_upgradeDAO.create(upgradeEntity);
> cluster.setUpgradeEntity(upgradeEntity);
> {code}
> {code}
> public void setUpgradeEntity(UpgradeEntity upgradeEntity) throws
> AmbariException {
> try {
> ClusterEntity clusterEntity = getClusterEntity();
> clusterEntity.setUpgradeEntity(upgradeEntity);
> clusterDAO.merge(clusterEntity);
> ...
> {code}
> The problem here is that the merge is propagated to the UpgradeEntity via a
> {{CascadeType.ALL}} and it's not necessary. It seems like the only cascade
> should be {{CascadeType.REMOVE}}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)