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 2019/12/23 15:17:46 UTC

[atlas] branch branch-2.0 updated: ATLAS-3563: Update tag propagation in-memory implementation to ignore deleted edges #2

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 f1af639  ATLAS-3563: Update tag propagation in-memory implementation to ignore deleted edges #2
f1af639 is described below

commit f1af639ef4d80b63385e0644e68bf9849a5d0ca9
Author: Sarath Subramanian <sa...@apache.org>
AuthorDate: Mon Dec 23 07:15:59 2019 -0800

    ATLAS-3563: Update tag propagation in-memory implementation to ignore deleted edges #2
    
    (cherry picked from commit bb10c16ffe1b3911af3161c74b45069fa8add94d)
---
 .../apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
index 4becb33..dc4c399 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
@@ -87,6 +87,7 @@ import static org.apache.atlas.glossary.GlossaryUtils.TERM_ASSIGNMENT_ATTR_EXPRE
 import static org.apache.atlas.glossary.GlossaryUtils.TERM_ASSIGNMENT_ATTR_SOURCE;
 import static org.apache.atlas.glossary.GlossaryUtils.TERM_ASSIGNMENT_ATTR_STATUS;
 import static org.apache.atlas.glossary.GlossaryUtils.TERM_ASSIGNMENT_ATTR_STEWARD;
+import static org.apache.atlas.model.instance.AtlasRelationship.Status.ACTIVE;
 import static org.apache.atlas.model.instance.AtlasRelationship.Status.DELETED;
 import static org.apache.atlas.model.typedef.AtlasBaseTypeDef.ATLAS_TYPE_BIGDECIMAL;
 import static org.apache.atlas.model.typedef.AtlasBaseTypeDef.ATLAS_TYPE_BIGINTEGER;
@@ -483,6 +484,10 @@ public class EntityGraphRetriever {
             Iterable<AtlasEdge> propagationEdges = entityVertex.getEdges(AtlasEdgeDirection.BOTH, tagPropagationEdges);
 
             for (AtlasEdge propagationEdge : propagationEdges) {
+                if (getEdgeStatus(propagationEdge) != ACTIVE) {
+                    continue;
+                }
+
                 PropagateTags tagPropagation = getPropagateTags(propagationEdge);
 
                 if (tagPropagation == null || tagPropagation == NONE) {