Skip to content

Commit

Permalink
Merge pull request #2389 from atlanhq/fix/list-api-null-vertex
Browse files Browse the repository at this point in the history
fix: skip BFS iteration if vertex contains null guid
  • Loading branch information
suraj5077 authored Sep 28, 2023
2 parents 10589a1 + 5d187ce commit 1e2a94e
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,13 @@ private void enqueueNeighbours(AtlasVertex currentVertex, boolean isDataset, Atl
else
neighbourVertex = currentEdge.getInVertex();

if (!lineageListContext.evaluateTraversalFilter(neighbourVertex))
String vertexGuid = getGuid(neighbourVertex);
if (StringUtils.isEmpty(vertexGuid) || !lineageListContext.evaluateTraversalFilter(neighbourVertex))
continue;

if (!skippedVertices.contains(getGuid(neighbourVertex)) && !visitedVertices.contains(getGuid(neighbourVertex))) {
visitedVertices.add(getGuid(neighbourVertex));
traversalQueue.add(getGuid(neighbourVertex));
if (!skippedVertices.contains(vertexGuid) && !visitedVertices.contains(vertexGuid)) {
visitedVertices.add(vertexGuid);
traversalQueue.add(vertexGuid);
addEntitiesToCache(neighbourVertex);
}
}
Expand Down

0 comments on commit 1e2a94e

Please sign in to comment.