You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by mayank jain <ma...@freestoneinfotech.com> on 2019/08/07 05:19:53 UTC
Review Request 71239: Atlas-3359 - Relationships : Unique attribute
in a relationship is not honoured.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71239/
-----------------------------------------------------------
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/1/
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
Re: Review Request 71239: Atlas-3359 - Relationships : Unique
attribute in a relationship is not honoured.
Posted by mayank jain <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71239/
-----------------------------------------------------------
(Updated Nov. 19, 2020, 4:19 p.m.)
Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath Subramanian.
Changes
-------
The updated patch has been rebase as per the updated changes in master.
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 (updated)
-----
graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java 2edca64
graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusIndexQuery.java ff3fd4a
intg/src/main/java/org/apache/atlas/AtlasErrorCode.java a14e43a
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java d0ffb85
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java b2be41c
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipStoreV2.java 8d74489
Diff: https://reviews.apache.org/r/71239/diff/4/
Changes: https://reviews.apache.org/r/71239/diff/3-4/
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
Re: Review Request 71239: Atlas-3359 - Relationships : Unique
attribute in a relationship is not honoured.
Posted by mayank jain <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71239/
-----------------------------------------------------------
(Updated Aug. 21, 2019, 1:11 p.m.)
Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath Subramanian.
Changes
-------
The raised bug has been resolved in the provided patch with the usage of indexes for retrieving relationship edges.
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 (updated)
-----
graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasIndexQuery.java f3722b8
graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusIndexQuery.java 7c258b7
intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 9a1aa65
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 8d8e4ad
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/3/
Changes: https://reviews.apache.org/r/71239/diff/2-3/
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
Re: Review Request 71239: Atlas-3359 - Relationships : Unique
attribute in a relationship is not honoured.
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
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
>
>
Re: Review Request 71239: Atlas-3359 - Relationships : Unique
attribute in a relationship is not honoured.
Posted by mayank jain <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
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.
Changes
-------
This update provides the fix for the scenario of update unique Relationshp attributes.
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 (updated)
-----
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/
Changes: https://reviews.apache.org/r/71239/diff/1-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