> On April 13, 2016, 12:21 a.m., Hemanth Yamijala wrote:
> > typesystem/src/main/java/org/apache/atlas/typesystem/types/FieldMapping.java,
> >  line 51
> > <https://reviews.apache.org/r/45948/diff/1/?file=1337582#file1337582line51>
> >
> >     This may not be a valid case - maybe Shwetha would know better... but 
> > if a FieldMapping instance's output is called from different threads, 
> > wouldn't this mutable state cause issues? Can't think of an easy way to fix 
> > that very quickly though. So please take a call based on whether it is a 
> > valid use case or not.
> 
> Shwetha GS wrote:
>     Yes, this will not work as there is single instance of type in the 
> system. Can you create the list and pass it in the output() method instead?

Rather than passing a list around, I moved the output status tracking to the 
structs themselves, which are not singletons like FieldMapping.


- David


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


On April 15, 2016, 6:36 p.m., David Kantor wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45948/
> -----------------------------------------------------------
> 
> (Updated April 15, 2016, 6:36 p.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-645
>     https://issues.apache.org/jira/browse/ATLAS-645
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> ATLAS-645: In FieldMapping.output(), avoid infinite recursion when 
> IReferenceableInstance and IStruct instances reference each other.
> 
> 
> Diffs
> -----
> 
>   typesystem/src/main/java/org/apache/atlas/typesystem/AbstractStruct.java 
> PRE-CREATION 
>   typesystem/src/main/java/org/apache/atlas/typesystem/IStruct.java 
> e0f85761a0f436cd4b4cd355d6c8ab65dca7fcc9 
>   typesystem/src/main/java/org/apache/atlas/typesystem/Struct.java 
> 70deab29df36e7e18f517c4880d7088f8bec06a5 
>   
> typesystem/src/main/java/org/apache/atlas/typesystem/persistence/DownCastStructInstance.java
>  d3b9a3376ebce92ff8b50708fa841ab5868b366a 
>   typesystem/src/main/java/org/apache/atlas/typesystem/persistence/Id.java 
> d742bb73e89772afcf8e0bd25f4fda9b7c94758b 
>   
> typesystem/src/main/java/org/apache/atlas/typesystem/persistence/StructInstance.java
>  16c3a24e51f0389946e0e6094a6a3e4e1b9dff0f 
>   
> typesystem/src/main/java/org/apache/atlas/typesystem/types/FieldMapping.java 
> 36149bafff80b68ce176e82dcacac87035459362 
>   
> typesystem/src/test/java/org/apache/atlas/typesystem/types/FieldMappingTest.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45948/diff/
> 
> 
> Testing
> -------
> 
> Ran all unit and integration tests with no regressions.  Added test cases
> 
> 
> Thanks,
> 
> David Kantor
> 
>

Reply via email to