-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39996/
-----------------------------------------------------------
(Updated Nov. 9, 2015, 2:59 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.
Preliminary patch:
- 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 (updated)
-----
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterServiceEntity.java
d34e2d5
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/ServiceComponentDesiredStateEntity.java
4195710
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
c0804ff
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 (updated)
-------
Looking to add further Unit tests.
Existing unit test pass.
Manual testing: Cluster deploy successful. Need to test blueprints.
Thanks,
Sid Wagle