-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69639/
-----------------------------------------------------------
Review request for atlas, Apoorv Naik, Ashutosh Mestry, Graham Wallis, Madhan
Neethiraj, and Sarath Subramanian.
Bugs: ATLAS-3012
https://issues.apache.org/jira/browse/ATLAS-3012
Repository: atlas
Description
-------
Following is the test scenario:
In the source cluster :
1. create table with 3 columns (id,name,dob)
2. drop column dob
3. add the same dob column again.
Now table has 3 ACTIVE columns and 1 DELETED column.
Export the db into the target cluster.
In the target cluster :
only 2 ACTIVE (id,name) and 1 DELETED (dob) column is present. The ACTIVE
column (dob) is not present.
The exported zip contains both the DELETED and the ACTIVE dob column entity.
In the source cluster ,
if GUID1 is GUID of ACTIVE dob entity , and GUID2 is GUID of deleted dob entity.
In the target cluster ,
GUID1 is GUID of DELETED entity.
Example :
In source :
ACTIVE:
https://atlas_source_host/index.html#!/detailPage/7cca7064-8519-4db3-aab5-ebd446d15070
DELETED: https:// atlas_source_host
/index.html#!/detailPage/f7686214-7585-4da3-875f-3e5223875289
In target :
DELETED : https:// atlas_target_host
/index.html#!/detailPage/7cca7064-8519-4db3-aab5-ebd446d15070
Entity with GUID f7686214-7585-4da3-875f-3e5223875289 is not found.
-----------------------------------------------------------------------------------
**Root Cause of issue**
During import of zip. The exported zip has two colums one active status and
other with deleted status. During preCreate with getResolvedEntityVertex is
called since the uniqueAttributes of both columns are same only first is
created and during second entity creeateUpdate only status is updated, due this
one Entity is created. The issue in uniqueNess of AtlasObjectId since does not
take status of Entity in account.
**Fix for this issue**
Added new unique attribute status to AtlasObjectId and modified equals and
hashcode methods
Diffs
-----
intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java
a8958a83f
repository/src/main/java/org/apache/atlas/repository/store/graph/EntityGraphDiscoveryContext.java
bd05c9877
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
066abc109
Diff: https://reviews.apache.org/r/69639/diff/1/
Testing
-------
Tested import & Exported with above scenario.
Ut/IT's are passing
Thanks,
Nixon Rodrigues