Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DG-1791 | Minor code optimisation #3654

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,6 @@ public void resetHasLineageOnInputOutputDelete(Collection<AtlasEdge> removedEdge

boolean isOutputEdge = PROCESS_OUTPUTS.equals(atlasEdge.getLabel());

AtlasVertex processVertex = atlasEdge.getOutVertex();
AtlasVertex assetVertex = atlasEdge.getInVertex();
String assetEdgeLabel = getLabel(getGuid(assetVertex), atlasEdge.getLabel());

Expand All @@ -1514,18 +1513,20 @@ public void resetHasLineageOnInputOutputDelete(Collection<AtlasEdge> removedEdge
updateAssetHasLineageStatus(assetVertex, atlasEdge, removedEdges);
}
}
if (getStatus(processVertex) == ACTIVE && !processVertex.equals(deletedVertex)) {
String edgeLabel = isOutputEdge ? PROCESS_OUTPUTS : PROCESS_INPUTS;

String processId = getGuid(processVertex);
String processEdgeLabel = getLabel(processId,edgeLabel);
boolean processLabelPairAlreadyProcessed = RequestContext.get().isEdgeLabelAlreadyProcessed(processEdgeLabel);
AtlasVertex processVertex = atlasEdge.getOutVertex();
String processId = getGuid(processVertex);
String edgeLabel = isOutputEdge ? PROCESS_OUTPUTS : PROCESS_INPUTS;
String processEdgeLabel = getLabel(processId, edgeLabel);
boolean processLabelPairAlreadyProcessed = RequestContext.get().isEdgeLabelAlreadyProcessed(processEdgeLabel);

if (processLabelPairAlreadyProcessed) {
continue;
}
RequestContext.get().addEdgeLabel(processEdgeLabel);
if (processLabelPairAlreadyProcessed) {
continue;
}

RequestContext.get().addEdgeLabel(processEdgeLabel);

if (getStatus(processVertex) == ACTIVE && !processVertex.equals(deletedVertex)) {
Iterator<AtlasEdge> edgeIterator = GraphHelper.getActiveEdges(processVertex, edgeLabel, AtlasEdgeDirection.BOTH);

boolean activeEdgeFound = false;
Expand Down
Loading