Repository: atlas Updated Branches: refs/heads/branch-1.0 dd29cb91c -> a00875362
ATLAS-2781: Hard Delete : Deleting an entity which is associated to an term associated to a tag fails (cherry picked from commit 59ae59dbaf8ce4a35886d5a9e5af7020666b1763) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/a0087536 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/a0087536 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/a0087536 Branch: refs/heads/branch-1.0 Commit: a00875362d724a22b2d00d1645f5a28dc8bcd075 Parents: dd29cb9 Author: Sarath Subramanian <ssubraman...@hortonworks.com> Authored: Fri Jul 6 15:24:41 2018 -0700 Committer: Sarath Subramanian <ssubraman...@hortonworks.com> Committed: Tue Sep 18 11:39:36 2018 -0700 ---------------------------------------------------------------------- .../repository/store/graph/v2/AtlasEntityChangeNotifier.java | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/a0087536/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityChangeNotifier.java ---------------------------------------------------------------------- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityChangeNotifier.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityChangeNotifier.java index 1b09d49..9d8afdf 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityChangeNotifier.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityChangeNotifier.java @@ -246,7 +246,14 @@ public class AtlasEntityChangeNotifier { return; } + RequestContext context = RequestContext.get(); + for (String guid : entityPropagationMap.keySet()) { + // if entity is deleted, don't send propagated classifications add/remove notifications. + if (context.isDeletedEntity(guid)) { + continue; + } + AtlasEntityWithExtInfo entityWithExtInfo = instanceConverter.getAndCacheEntity(guid); AtlasEntity entity = entityWithExtInfo != null ? entityWithExtInfo.getEntity() : null;