ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-20672) Cluster Merge At End Of Upgrade Creation Cascades Unnecessarily
Date Tue, 04 Apr 2017 22:05:41 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-20672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15955945#comment-15955945
] 

Hudson commented on AMBARI-20672:
---------------------------------

FAILURE: Integrated in Jenkins build Ambari-branch-2.5 #1354 (See [https://builds.apache.org/job/Ambari-branch-2.5/1354/])
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=dde4e05cfc4106e2067e21b3593bb6609bd3407a])
* (edit) ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/state/services/RetryUpgradeActionServiceTest.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/orm/dao/UpgradeDAOTest.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertStateChangedListener.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/state/services/RetryUpgradeActionService.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/orm/dao/UpgradeDAO.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/StackVersionListener.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/StackVersionListenerTest.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProviderTest.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.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)

Mime
View raw message