[ 
https://issues.apache.org/jira/browse/ATLAS-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sarath Subramanian updated ATLAS-1943:
--------------------------------------
    Description: 
Fix the following IT failures due to
Failed tests: 
  EntityJerseyResourceIT.testCompleteUpdate:952 » AtlasService Metadata 
service ...
  EntityJerseyResourceIT.testPartialUpdate:877 » AtlasService Metadata service 
A...

After creating a relationship for inverse reference attribute, call is made to 
create relationship for ownedRef attribute. But relationship for ownedRef has 
already been created and we see exception in log - “relationship already 
exists”. 

For e.g.: after creating a relationship for hive_storagedesc.table, a new 
relationship to create hive_table.sd is attempted – but fails since 
relationship already exists (already created).  Added a new method 
getOrCreate(relationship) - If a relationship already exists between two 
entities on an attribute retrieve it, if not create one. Validated the patch by 
creating hive_table, views – lineage are rendered fine.

  was:
Fix the following IT failures due to
Failed tests: 
  EntityJerseyResourceIT.testCompleteUpdate:952 » AtlasService Metadata 
service ...
  EntityJerseyResourceIT.testPartialUpdate:877 » AtlasService Metadata service 
A...

After creating inverse reference, call is made to create relationship for 
ownedRef attribute. This call fails when an edge already exists. The edge 
exists as it was already created. Added getOrCreate relationship method to get 
a relationship if it exists, if not create a new relationship.


> Fix IT failure due to incorrect inverse reference check using relationship
> --------------------------------------------------------------------------
>
>                 Key: ATLAS-1943
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1943
>             Project: Atlas
>          Issue Type: Bug
>            Reporter: Sarath Subramanian
>            Assignee: Sarath Subramanian
>            Priority: Critical
>         Attachments: ATLAS-1943.1.patch
>
>
> Fix the following IT failures due to
> Failed tests: 
>   EntityJerseyResourceIT.testCompleteUpdate:952 » AtlasService Metadata 
> service ...
>   EntityJerseyResourceIT.testPartialUpdate:877 » AtlasService Metadata 
> service A...
> After creating a relationship for inverse reference attribute, call is made 
> to create relationship for ownedRef attribute. But relationship for ownedRef 
> has already been created and we see exception in log - “relationship already 
> exists”. 
> For e.g.: after creating a relationship for hive_storagedesc.table, a new 
> relationship to create hive_table.sd is attempted – but fails since 
> relationship already exists (already created).  Added a new method 
> getOrCreate(relationship) - If a relationship already exists between two 
> entities on an attribute retrieve it, if not create one. Validated the patch 
> by creating hive_table, views – lineage are rendered fine.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to