Skip to content

Commit 1e10033

Browse files
chaitalicodchaitalithombare
andauthored
ATLAS-5055: Incremental Export : When entity exported has a tag propagated from entity which is deleted , tag is not propagated to it at target (#377)
Co-authored-by: chaitalithombare <chaitalithombare@apache.org>
1 parent bc3f6b5 commit 1e10033

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
package org.apache.atlas.repository.store.graph.v2;
1919

2020
import com.fasterxml.jackson.core.type.TypeReference;
21+
import org.apache.atlas.AtlasConfiguration;
2122
import org.apache.atlas.AtlasErrorCode;
23+
import org.apache.atlas.RequestContext;
2224
import org.apache.atlas.exception.AtlasBaseException;
2325
import org.apache.atlas.model.TimeBoundary;
2426
import org.apache.atlas.model.glossary.AtlasGlossaryCategory;
@@ -162,6 +164,7 @@ public class EntityGraphRetriever {
162164
private static final String GLOSSARY_CATEGORY_HIERARCHY_EDGE_LABEL = "r:AtlasGlossaryCategoryHierarchyLink";
163165
private static final String GLOSSARY_CATEGORY_TYPE_NAME = AtlasGlossaryCategory.class.getSimpleName();
164166
private static final String PARENT_GLOSSARY_CATEGORY_GUID = "parentCategoryGuid";
167+
private boolean deferredActionEnabled = AtlasConfiguration.TASKS_USE_ENABLED.getBoolean();
165168

166169
private static final TypeReference<List<TimeBoundary>> TIME_BOUNDARIES_LIST_TYPE = new TypeReference<List<TimeBoundary>>() {};
167170

@@ -698,7 +701,7 @@ private void traverseImpactedVertices(final AtlasVertex entityVertexStart, final
698701
Iterable<AtlasEdge> propagationEdges = entityVertex.getEdges(AtlasEdgeDirection.BOTH, tagPropagationEdges);
699702

700703
for (AtlasEdge propagationEdge : propagationEdges) {
701-
if (getEdgeStatus(propagationEdge) != ACTIVE) {
704+
if (getEdgeStatus(propagationEdge) != ACTIVE && !deferredActionEnabled && !RequestContext.get().isImportInProgress()) {
702705
continue;
703706
}
704707

0 commit comments

Comments
 (0)