Repository: atlas Updated Branches: refs/heads/branch-1.0 2a8c2d3de -> c073253c0
ATLAS-2703: entity delete should not remove its term associations Change-Id: I23b53086b2bb2380f451e7d85b59096edc610181 Signed-off-by: Madhan Neethiraj <[email protected]> (cherry picked from commit 4dc6284eb63eb68e3985d1d34542a5ff9818c38b) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/c073253c Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/c073253c Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/c073253c Branch: refs/heads/branch-1.0 Commit: c073253c0be64b2a08db7ed1e0fcbd5b11e69428 Parents: 2a8c2d3 Author: apoorvnaik <[email protected]> Authored: Fri May 18 13:57:13 2018 -0700 Committer: Madhan Neethiraj <[email protected]> Committed: Fri May 18 15:25:23 2018 -0700 ---------------------------------------------------------------------- .../apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/c073253c/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java ---------------------------------------------------------------------- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java index acb8431..f417b4e 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java @@ -161,7 +161,7 @@ public abstract class DeleteHandlerV1 { */ public void deleteRelationships(Collection<AtlasEdge> edges) throws AtlasBaseException { for (AtlasEdge edge : edges) { - boolean isInternal = isInternalType(edge.getInVertex()) || isInternalType(edge.getOutVertex()); + boolean isInternal = isInternalType(edge.getInVertex()) && isInternalType(edge.getOutVertex()); if (!isInternal && getState(edge) == DELETED) { if (LOG.isDebugEnabled()) { @@ -851,7 +851,7 @@ public abstract class DeleteHandlerV1 { } if (edge != null) { - deleteEdge(edge, isInternalType(inVertex) || isInternalType(outVertex)); + deleteEdge(edge, isInternalType(inVertex) && isInternalType(outVertex)); RequestContextV1 requestContext = RequestContextV1.get();
