Repository: atlas Updated Branches: refs/heads/master ec396b931 -> 59ae59dba
ATLAS-2781: Hard Delete : Deleting an entity which is associated to an term associated to a tag fails Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/59ae59db Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/59ae59db Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/59ae59db Branch: refs/heads/master Commit: 59ae59dbaf8ce4a35886d5a9e5af7020666b1763 Parents: ec396b9 Author: Sarath Subramanian <[email protected]> Authored: Fri Jul 6 15:24:41 2018 -0700 Committer: Sarath Subramanian <[email protected]> Committed: Fri Jul 6 15:24:41 2018 -0700 ---------------------------------------------------------------------- .../repository/store/graph/v2/AtlasEntityChangeNotifier.java | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/59ae59db/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 deb79e5..65c1e77 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;
