Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
2.4.2
-
None
Description
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.
upgradeEntity.setRequestId(request.getId()); request.persist(); s_upgradeDAO.create(upgradeEntity); cluster.setUpgradeEntity(upgradeEntity);
public void setUpgradeEntity(UpgradeEntity upgradeEntity) throws AmbariException { try { ClusterEntity clusterEntity = getClusterEntity(); clusterEntity.setUpgradeEntity(upgradeEntity); clusterDAO.merge(clusterEntity); ...
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
Attachments
Attachments
Issue Links
- links to