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

[atlas] branch branch-2.0 updated: ATLAS-3977: Deleted entity behavior fix during migration. Part 2

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

amestry 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 374e20e  ATLAS-3977: Deleted entity behavior fix during migration. Part 2
374e20e is described below

commit 374e20e49931040bee996a56e32d477ceb049893
Author: Ashutosh Mestry <am...@cloudera.com>
AuthorDate: Tue Oct 13 16:46:03 2020 -0700

    ATLAS-3977: Deleted entity behavior fix during migration. Part 2
---
 .../org/apache/atlas/repository/patches/UniqueAttributePatch.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/repository/src/main/java/org/apache/atlas/repository/patches/UniqueAttributePatch.java b/repository/src/main/java/org/apache/atlas/repository/patches/UniqueAttributePatch.java
index d3111f1..c30bd25 100644
--- a/repository/src/main/java/org/apache/atlas/repository/patches/UniqueAttributePatch.java
+++ b/repository/src/main/java/org/apache/atlas/repository/patches/UniqueAttributePatch.java
@@ -18,6 +18,7 @@
 package org.apache.atlas.repository.patches;
 
 import org.apache.atlas.exception.AtlasBaseException;
+import org.apache.atlas.model.instance.AtlasEntity;
 import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef;
 import org.apache.atlas.pc.WorkItemManager;
 import org.apache.atlas.repository.Constants;
@@ -164,7 +165,9 @@ public class UniqueAttributePatch extends AtlasPatchHandler {
             LOG.debug("processItem(typeName={}, vertexId={})", typeName, vertexId);
 
             processIndexStringAttribute(vertexId, vertex, typeName, entityType);
-            processUniqueAttribute(vertexId, vertex, typeName, entityType);
+            if (AtlasGraphUtilsV2.getState(vertex) == AtlasEntity.Status.ACTIVE) {
+                processUniqueAttribute(vertexId, vertex, typeName, entityType);
+            }
 
             LOG.debug("processItem(typeName={}, vertexId={}): Done!", typeName, vertexId);
         }