This is an automated email from the ASF dual-hosted git repository. nixon pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new 4db7479 ATLAS-4278 - Deferred Actions : Deleting a tag after disassociating it from a table which propagated fails 4db7479 is described below commit 4db747954abbbf1f794465e0f69f31833fb2450a 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> (cherry picked from commit ed1c4854ba05093ac9484b2c96e284520414dfc3) --- .../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));