This is an automated email from the ASF dual-hosted git repository.

amestry pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 2e40de917083c7c5583a61537b6447ab3af41918
Author: Deep Singh <[email protected]>
AuthorDate: Fri Dec 11 12:45:37 2020 -0600

    ATLAS-4076: Propagated-tag-addition entries were appearing multiple times 
on derived table audit
    
    Signed-off-by: Ashutosh Mestry <[email protected]>
---
 .../repository/store/graph/v2/AtlasEntityChangeNotifier.java      | 2 ++
 server-api/src/main/java/org/apache/atlas/RequestContext.java     | 8 ++++++++
 2 files changed, 10 insertions(+)

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 32ad65e..99be169 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
@@ -359,7 +359,9 @@ public class AtlasEntityChangeNotifier implements 
IAtlasEntityChangeNotifier {
         Map<String, List<AtlasClassification>> removedPropagations = 
context.getRemovedPropagations();
 
         notifyPropagatedEntities(addedPropagations, 
PROPAGATED_CLASSIFICATION_ADD);
+        context.clearAddedPropagations();
         notifyPropagatedEntities(removedPropagations, 
PROPAGATED_CLASSIFICATION_DELETE);
+        context.clearRemovePropagations();
     }
 
     @Override
diff --git a/server-api/src/main/java/org/apache/atlas/RequestContext.java 
b/server-api/src/main/java/org/apache/atlas/RequestContext.java
index 32ffddd..7f0cfe5 100644
--- a/server-api/src/main/java/org/apache/atlas/RequestContext.java
+++ b/server-api/src/main/java/org/apache/atlas/RequestContext.java
@@ -329,6 +329,14 @@ public class RequestContext {
         return deletedEntities.values();
     }
 
+    public void clearRemovePropagations() {
+        removedPropagations.clear();
+    }
+
+    public void clearAddedPropagations() {
+        addedPropagations.clear();
+    }
+
     /**
      * Checks if an instance with the given guid is in the cache for this 
request.  Either returns the instance
      * or null if it is not in the cache.

Reply via email to