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 2bb3199 ATLAS-4268: Deferred Actions : When a tag is already associated to a term and when the term is assigned to the entity, tag propagation doesn't happen 2bb3199 is described below commit 2bb3199f528952cbea3bbde9f25b57f98217550c Author: Sarath Subramanian <sar...@apache.org> AuthorDate: Thu Apr 29 12:33:03 2021 -0700 ATLAS-4268: Deferred Actions : When a tag is already associated to a term and when the term is assigned to the entity, tag propagation doesn't happen (cherry picked from commit 7e73fc2591f8177630f1ffd82e774b490832650a) --- .../apache/atlas/repository/store/graph/v2/EntityGraphMapper.java | 2 +- .../atlas/repository/store/graph/v2/EntityGraphRetriever.java | 6 +++++- 2 files changed, 6 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 2a71e34..02ba5ef 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 @@ -2059,7 +2059,7 @@ public class EntityGraphMapper { return null; } - List<AtlasVertex> impactedVertices = entityRetriever.getImpactedVerticesV2(entityVertex, relationshipGuid, classificationVertexId); + List<AtlasVertex> impactedVertices = entityRetriever.getIncludedImpactedVerticesV2(entityVertex, relationshipGuid, classificationVertexId); if (CollectionUtils.isEmpty(impactedVertices)) { LOG.debug("propagateClassification(entityGuid={}, classificationVertexId={}): found no entities to propagate the classification", entityGuid, classificationVertexId); 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 2e0f39a..9abcf64 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 @@ -510,9 +510,13 @@ public class EntityGraphRetriever { } public List<AtlasVertex> getIncludedImpactedVerticesV2(AtlasVertex entityVertex, String relationshipGuidToExclude) { + return getIncludedImpactedVerticesV2(entityVertex, relationshipGuidToExclude, null); + } + + public List<AtlasVertex> getIncludedImpactedVerticesV2(AtlasVertex entityVertex, String relationshipGuidToExclude, String classificationId) { List<AtlasVertex> ret = new ArrayList<>(Arrays.asList(entityVertex)); - traverseImpactedVertices(entityVertex, relationshipGuidToExclude, null, ret); + traverseImpactedVertices(entityVertex, relationshipGuidToExclude, classificationId, ret); return ret; }