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

(Updated Nov. 17, 2022, 1:47 p.m.)


Review request for atlas, Jayendra Parab and Pinal Shah.


Bugs: ATLAS-3403
    https://issues.apache.org/jira/browse/ATLAS-3403


Repository: atlas


Description
-------

Let us consider that a classification and a term has been assigned to an 
entity. 

If that entity is deleted, and then when the "Show Historical Entities" filter 
is enabled on the search results page for that entity, the classification is 
displayed but not the term.

This patch handles above issue


Diffs (updated)
-----

  
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
 0ed418330 
  repository/src/test/java/org/apache/atlas/glossary/GlossaryServiceTest.java 
27717c313 


Diff: https://reviews.apache.org/r/74195/diff/3/

Changes: https://reviews.apache.org/r/74195/diff/2-3/


Testing
-------

mvn clean install

Entities ,classification,terms,glossaries getting created successfully


PC successful
https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1284/console


Created an Entity of type hdfs_path as "abc" added classification "class1" and 
assigned a term as well "term1"
then deleted the entity when we search this entity using 
http://localhost:21000/api/atlas/v2/search/basic

without the fix we cant see "term1" in response under "meanings" tab because 
there is a check in the code where if edge is deleted we then term will not be 
assigned to the deleted entity hence we couldnt see it under "show historical 
data"

Below json for output after fixing issue we can see term getting added in 
MeaningNames and meanings:

http://localhost:21000/api/atlas/v2/search/basic


{"queryType":"BASIC","searchParameters":{"typeName":"hdfs_path","excludeDeletedEntities":false,"includeClassificationAttributes":true,"includeSubTypes":true,"includeSubClassifications":true,"excludeHeaderAttributes":false,"limit":25,"offset":0,"attributes":[]},"entities":[{"typeName":"hdfs_path","attributes":{"owner":"","createTime":1667845800000,"qualifiedName":"abc","name":"abc","description":""},"guid":"22f365a3-5d7c-49d0-b2dc-324adf77d3fe","status":"DELETED","displayText":"abc","classificationNames":["class1"],"classifications":[{"typeName":"class1","entityGuid":"22f365a3-5d7c-49d0-b2dc-324adf77d3fe","entityStatus":"DELETED","propagate":true,"validityPeriods":[],"removePropagationsOnEntityDelete":false}],"meaningNames":["term1"],"meanings":[{"termGuid":"c983b9b9-5b0a-409b-9a30-c0328cd1b3ad","relationGuid":"29ddea1a-adbf-4e48-9c85-72b8a97e10ac","displayText":"term1","confidence":0,"qualifiedName":"term1@gloss1"}],"isIncomplete":false,"labels":[]}],"approximateCount":1}


Thanks,

chaitali

Reply via email to