> On June 3, 2016, 11:29 p.m., Suma Shivaprasad wrote:
> > repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java,
> >  line 443
> > <https://reviews.apache.org/r/47658/diff/5/?file=1405688#file1405688line443>
> >
> >     for map types, can we check if the reverseAttributeName is set on the 
> > map type and remove it if set else ignore?
> 
> David Kantor wrote:
>     I'm thinking it may be better to remove the reverse attribute name when 
> the type is registered and possibly issue a warning that bi-directional 
> references are not supported for map types, rather then doing it every time 
> there is an update operation involving that type.  Thoughts?
> 
> Suma Shivaprasad wrote:
>     yeah that seems like a better option
> 
> David Kantor wrote:
>     In thinking more about this, perhaps it is beyond the scope of this JIRA 
> to make such a significant change to the type system functionality.  You 
> could argue that having a bi-directional reference where one of the ends is a 
> map reference is OK, it's just that in the specific case where the user just 
> updates the non-map end of the reference, we don't know what to use for the 
> map key when updating the reverse map reference so we can't support 
> auto-updating in that use case.  It doesn't necessarily mean that the type 
> system should ignore/remove the reverseAttributeName on a map reference at 
> registration time.  Modelers may have a valid use case for bi-directional map 
> references and if we suddenly change the type system to ignore or remove the 
> reverseAttributeName, that could be a breaking change to existing 
> applications.  Perhaps your point in the original comment is that if we don't 
> support auto-updating when just the non-map reference is updated, we should 
> be consistent and not 
 support automatic reverse reference updating if *either* end of the reference 
is a map.

Added logic to avoid automatic reverse reference updating if either end of a 
bi-directional reference is a map.


- David


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


On June 17, 2016, 1:32 a.m., David Kantor wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47658/
> -----------------------------------------------------------
> 
> (Updated June 17, 2016, 1:32 a.m.)
> 
> 
> Review request for atlas and Shwetha GS.
> 
> 
> Bugs: ATLAS-499
>     https://issues.apache.org/jira/browse/ATLAS-499
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> ATLAS-499: Automatically update inverse references to prevent repository 
> corruption from unbalanced references.
> 
> 
> Diffs
> -----
> 
>   addons/hive-bridge/pom.xml 47e72e814a421f03b00a9b7c6a13163e1b67ca14 
>   addons/hive-bridge/src/test/resources/je.properties PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 
> 91f9bd008a6939dfe78656f5c1845637a30ee9eb 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 
> 4f6d0118072380342f5ea302d0aaf7902784849a 
>   
> repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java
>  4c1f5591f4adead41c3336e64b0bc956836f7edb 
>   
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java
>  449e066a167ba4546b118a77c8e3de5fd99f077b 
>   
> repository/src/test/java/org/apache/atlas/repository/graph/ReverseReferenceUpdateHardDeleteTest.java
>  PRE-CREATION 
>   
> repository/src/test/java/org/apache/atlas/repository/graph/ReverseReferenceUpdateSoftDeleteTest.java
>  PRE-CREATION 
>   
> repository/src/test/java/org/apache/atlas/repository/graph/ReverseReferenceUpdateTestBase.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/47658/diff/
> 
> 
> Testing
> -------
> 
> Ran all unit and integration tests with no regressions.
> 
> 
> Thanks,
> 
> David Kantor
> 
>

Reply via email to