ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sid Wagle" <swa...@hortonworks.com>
Subject Re: Review Request 41477: Fix stale cluster entity reference which results in merge issues
Date Wed, 06 Jan 2016 03:00:22 GMT


> On Jan. 6, 2016, 2:17 a.m., Sumit Mohanty wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java,
line 194
> > <https://reviews.apache.org/r/41477/diff/3/?file=1183400#file1183400line194>
> >
> >     We allow cluster name change - that should be OK, I assume.

Yes setter handles the update.


> On Jan. 6, 2016, 2:17 a.m., Sumit Mohanty wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java,
line 3312
> > <https://reviews.apache.org/r/41477/diff/3/?file=1183400#file1183400line3312>
> >
> >     OK, so no local caching. At least for cluster entity it should not be an issue
anyway.

Other places could be refactored as well.


- Sid


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


On Jan. 6, 2016, 1:43 a.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41477/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2016, 1:43 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Myroslav Papirkovskyy, Nate Cole, and Sumit
Mohanty.
> 
> 
> Bugs: AMBARI-14411
>     https://issues.apache.org/jira/browse/AMBARI-14411
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> *Preliminary patch*
> 
> Symptom:
> 
> {code}
> Local Exception Stack: 
> Exception [EclipseLink-6004] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd):
org.eclipse.persistence.exceptions.QueryException
> Exception Description: The object [org.apache.ambari.server.orm.entities.ClusterConfigEntity@3646b3a8],
of class [class org.apache.ambari.server.orm.entities.ClusterConfigEntity], with identity
hashcode (System.identityHashCode()) [364,075,546], 
> is not from this UnitOfWork object space, but the parent session's.  The object was never
registered in this UnitOfWork, 
> but read from the parent session and related to an object registered in the UnitOfWork.
 Ensure that you are correctly
> registering your objects.  If you are still having problems, you can use the UnitOfWork.validateObjectSpace()
method to 
> help debug where the error occurred.  For more information, see the manual or FAQ.
> 	at org.eclipse.persistence.exceptions.QueryException.backupCloneIsOriginalFromParent(QueryException.java:298)
> 	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.getBackupClone(UnitOfWorkImpl.java:1995)
> 	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerExistingObject(UnitOfWorkImpl.java:3976)
> 	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerExistingObject(UnitOfWorkImpl.java:3894)
> 	at org.eclipse.persistence.mappings.CollectionMapping.buildElementUnitOfWorkClone(CollectionMapping.java:308)
> 	at org.eclipse.persistence.mappings.CollectionMapping.buildElementClone(CollectionMapping.java:321)
> 	at org.eclipse.persistence.internal.queries.ContainerPolicy.addNextValueFromIteratorInto(ContainerPolicy.java:217)
> {code}
> 
> Likely Cause:
> Stale clusterEntity reference points to a detached entity which gets tried to be merged,
the Cascaded relationship throws the error on persist.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
3358e8c 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
3998f1c 
> 
> Diff: https://reviews.apache.org/r/41477/diff/
> 
> 
> Testing
> -------
> 
> Unit testing in progress.
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


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