ambari-issues mailing list archives

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

     [ https://issues.apache.org/jira/browse/AMBARI-20672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan Hurley updated AMBARI-20672:
-------------------------------------
    Status: Patch Available  (was: Open)

> 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