[
https://issues.apache.org/jira/browse/AMBARI-13753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15004913#comment-15004913
]
Jayush Luniya commented on AMBARI-13753:
----------------------------------------
Reopened due to unit test failures.
Trunk:
commit 686dcc57f6ffaef7f62ee6649438c97f021efcfc
Author: Jayush Luniya <[email protected]>
Date: Fri Nov 13 15:26:49 2015 -0800
Revert "AMBARI-13753. Refactor code that caches stale entity references.
(swagle)"
This reverts commit 3083cdbab4ba03f2ae9f0b6fa02c63747dd82fa0.
Branch-2.1:
commit dcf898b7b9baa9d85f8f42048128ab4ae6bdb24f
Author: Jayush Luniya <[email protected]>
Date: Fri Nov 13 15:33:24 2015 -0800
Revert "AMBARI-13753. Refactor code that caches stale entity references.
(swagle)"
This reverts commit 9bacc2557fe71138d472166ef72f147d5b1057c4.
> Refactor code that caches stale entity references
> --------------------------------------------------
>
> Key: AMBARI-13753
> URL: https://issues.apache.org/jira/browse/AMBARI-13753
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Affects Versions: 1.5.0
> Reporter: Siddharth Wagle
> Assignee: Siddharth Wagle
> Fix For: 2.1.3
>
>
> Problems:
> - Deleted hostcomponent rows re-appear
> - Inconsistencies in hostcomponentstate and hostcomponentdesiredstate tables
> Analysis:
> - Stale entity references cached that point to dettached entites and may get
> persisted in altogether different transaction
> - Cascaded persist annotation mixed with manual bi-directional persist
> operations. The manual persist was done since there are cached references in
> the object hierarchy at different levels. The Casade addition seems to have
> been an after thought added on even though manual bi-directional perist
> laways existed.
> Patch details:
> - Make sure cached references are refreshed on getter / setter methods
> - Remove Cascaded persist for only those relations that could result in
> un-intentional persist of the relationship with downstream objects. eg:
> ServiceComponentHostDesiredStateEntity
> - Marked HostRoleCommand and ExecutionCommand as non-Cacheable entites for JPA
> - Make sure bi-directional persist is present on non-Cascaded entities
> - Removed refresh() calls that were responsible for refreshing cached entity
> objects
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)