Skip to content

Commit

Permalink
fix: Filter deleted relations in List API traversal
Browse files Browse the repository at this point in the history
  • Loading branch information
suraj5077 committed Dec 9, 2024
1 parent e463e5a commit 8da3eac
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -534,15 +534,15 @@ private void traverseEdgesUsingBFS(String baseGuid, AtlasLineageListContext line
private void enqueueNeighbours(AtlasVertex currentVertex, boolean isDataset,
AtlasLineageListContext lineageListContext, Queue<String> traversalQueue,
Set<String> visitedVertices, Set<String> skippedVertices,
Map<String, List<String>> lineageParentsForEntityMap, Map<String, List<String>> lineageChildrenForEntityMap) {
Map<String, List<String>> lineageParentsForEntityMap, Map<String, List<String>> lineageChildrenForEntityMap) throws AtlasBaseException {
AtlasPerfMetrics.MetricRecorder traverseEdgesOnDemandGetEdges = RequestContext.get().startMetricRecord("traverseEdgesOnDemandGetEdges");
Iterator<AtlasEdge> edges;
if (isDataset)
edges = currentVertex.getEdges(IN, isInputDirection(lineageListContext) ? PROCESS_OUTPUTS_EDGE : PROCESS_INPUTS_EDGE).iterator();
edges = GraphHelper.getActiveEdges(currentVertex, isInputDirection(lineageListContext) ? PROCESS_OUTPUTS_EDGE : PROCESS_INPUTS_EDGE, IN);
else
edges = currentVertex.getEdges(OUT, isInputDirection(lineageListContext) ? PROCESS_INPUTS_EDGE : PROCESS_OUTPUTS_EDGE).iterator();
RequestContext.get().endMetricRecord(traverseEdgesOnDemandGetEdges);
edges = GraphHelper.getActiveEdges(currentVertex, isInputDirection(lineageListContext) ? PROCESS_INPUTS_EDGE : PROCESS_OUTPUTS_EDGE, OUT);

RequestContext.get().endMetricRecord(traverseEdgesOnDemandGetEdges);
while (edges.hasNext()) {
AtlasEdge currentEdge = edges.next();
if (!lineageListContext.evaluateTraversalFilter(currentEdge))
Expand Down

0 comments on commit 8da3eac

Please sign in to comment.