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

Hudson commented on AMBARI-13753:
---------------------------------

FAILURE: Integrated in Ambari-branch-2.1 #873 (See 
[https://builds.apache.org/job/Ambari-branch-2.1/873/])
AMBARI-13753. Refactor code that caches stale entity references. Fixed (swagle: 
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=ea4e31ad2b3207e251ebb4b4aee5fe41e4dcb4d1])
* 
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
* 
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog150Test.java
* 
ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java
* 
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java
* 
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog150.java
* 
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
* ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java
* 
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
* 
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
* 
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
* 
ambari-server/src/test/java/org/apache/ambari/server/testing/DBInconsistencyTests.java
* 
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterServiceEntity.java
* 
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
* 
ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
* 
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
* 
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java


> 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)

Reply via email to