This is an automated email from the ASF dual-hosted git repository. nixon pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push: new ed1c485 ATLAS-4278 - Deferred Actions : Deleting a tag after disassociating it from a table which propagated fails ed1c485 is described below commit ed1c4854ba05093ac9484b2c96e284520414dfc3 Author: Jayendra Parab <jayen...@freestoneinfotech.com> AuthorDate: Sun May 9 17:45:26 2021 +0530 ATLAS-4278 - Deferred Actions : Deleting a tag after disassociating it from a table which propagated fails Signed-off-by: nixonrodrigues <ni...@apache.org> --- .../org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java index 02ba5ef..7984a34 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java @@ -2569,6 +2569,7 @@ public class EntityGraphMapper { GraphTransactionInterceptor.lockObjectAndReleasePostCommit(entityGuid); AtlasVertex classificationVertex = graph.getVertex(classificationVertexId); + AtlasClassification classification = entityRetriever.toAtlasClassification(classificationVertex); if (classificationVertex == null) { LOG.warn("deleteClassificationPropagation(classificationVertexId={}): classification vertex not found", classificationVertexId); @@ -2578,12 +2579,13 @@ public class EntityGraphMapper { List<AtlasVertex> entityVertices = deleteDelegate.getHandler().removeTagPropagation(classificationVertex); + deleteDelegate.getHandler().deleteClassificationVertex(classificationVertex, true); + if (CollectionUtils.isEmpty(entityVertices)) { return null; } - AtlasClassification classification = entityRetriever.toAtlasClassification(classificationVertex); List<AtlasEntity> propagatedEntities = updateClassificationText(classification, entityVertices); entityChangeNotifier.onClassificationsDeletedFromEntities(propagatedEntities, Collections.singletonList(classification));