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




repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java
Lines 444 (patched)
<https://reviews.apache.org/r/71239/#comment304415>

    Instead of this approach, I suggest creating unique-index for the 
relationship-attribute, similar to the indices created for entity attributes - 
refer to GraphBackedSearchIndexer.createIndexForAttribute().


- Madhan Neethiraj


On Aug. 7, 2019, 9:42 a.m., mayank jain wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71239/
> -----------------------------------------------------------
> 
> (Updated Aug. 7, 2019, 9:42 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath 
> Subramanian.
> 
> 
> Bugs: Atlas-3359
>     https://issues.apache.org/jira/browse/Atlas-3359
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When defining a unique attribute for a relationshipDef . the instance for 
> this newly updated relationshipDef does not treats the unique attribute as 
> unique but rather treats as normal attribute only (that means the duplication 
> of values is allowed just like other normal attributes).
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 9a1aa65 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java
>  70b01a5 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipStoreV2.java
>  1c8b057 
> 
> 
> Diff: https://reviews.apache.org/r/71239/diff/2/
> 
> 
> Testing
> -------
> 
> 1.Created a relationship typedef between type1 & type2 with attribute "attr1" 
> which is unique (set "IsUnique" to true).
> 2. Created entity1 (type1) and entity2(type2) and created a relationship 
> instance between them with "attr1" value , say "value1".
> 3. Created entity3 (type1) and entity4(type2) and created a relationship 
> instance between them with "attr1" value with the same value "value1".
> 
> Expected the relationship creation between entity3 and entity4 would fail 
> because a relationship with "attr1 " with "value1" is already created between 
> entity1 and entity2. But request passed and the relationship is created 
> successfully.
> 
> 
> Thanks,
> 
> mayank jain
> 
>

Reply via email to