You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sa...@apache.org on 2020/04/10 22:23:58 UTC

[atlas] branch branch-2.0 updated: ATLAS-3707: Added check to avoid new audit to be created for delete in case of purge

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

sarath 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 0a64e11  ATLAS-3707: Added check to avoid new audit to be created for delete in case of purge
0a64e11 is described below

commit 0a64e11e1d13f1016f3e52c42e0cca14f54bc1bd
Author: sidmishra <si...@cloudera.com>
AuthorDate: Mon Mar 30 11:56:40 2020 -0700

    ATLAS-3707: Added check to avoid new audit to be created for delete in case of purge
    
    Signed-off-by: Sarath Subramanian <sa...@apache.org>
    (cherry picked from commit c135962b8340444943223a33fce67a06fda55b5b)
---
 .../apache/atlas/repository/store/graph/v2/EntityGraphMapper.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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 7653e2f..9269ae6 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
@@ -318,8 +318,10 @@ public class EntityGraphMapper {
 
         RequestContext req = RequestContext.get();
 
-        for (AtlasEntityHeader entity : req.getDeletedEntities()) {
-            resp.addEntity(DELETE, entity);
+        if(!req.isPurgeRequested()) {
+            for (AtlasEntityHeader entity : req.getDeletedEntities()) {
+                resp.addEntity(DELETE, entity);
+            }
         }
 
         for (AtlasEntityHeader entity : req.getUpdatedEntities()) {