ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Toader" <stoa...@hortonworks.com>
Subject Re: Review Request 39996: Refactor code that caches stale entity references
Date Wed, 11 Nov 2015 08:41:09 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39996/#review106025
-----------------------------------------------------------

Ship it!


Ship it.

- Sebastian Toader


On Nov. 11, 2015, 4:11 a.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39996/
> -----------------------------------------------------------
> 
> (Updated Nov. 11, 2015, 4:11 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Mahadev Konar, Myroslav
Papirkovskyy, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-13753
>     https://issues.apache.org/jira/browse/AMBARI-13753
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 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 appropriately
> - Remove Cascaded persist for only those relations that could result in un-intentional
persist of the relationship with downstream objects. eg: ServiceComponentHostDesiredStateEntity
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
99c327f 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterServiceEntity.java
eade294 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ExecutionCommandEntity.java
25d830b 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
101aea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
ee8e7d6 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java 42f7777

>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java
bb8ba19 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
c39ecc4 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
6150011 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java bbe2f62

>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
7b1c6ca 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog150.java
f6b388f 
>   ambari-server/src/test/java/org/apache/ambari/server/testing/DBInconsistencyTests.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog150Test.java
39dd815 
> 
> Diff: https://reviews.apache.org/r/39996/diff/
> 
> 
> Testing
> -------
> 
> Looking to add further Unit tests.
> 
> Existing unit test pass. Last re-run remainig.
> 
> Manual testing scenarios pass:
> - Cluster deploy
> - Add Service
> - Add host
> - Delete service
> - Delete host
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message