Skip to content

Commit

Permalink
Merge pull request #4362 from atlanhq/MLH-173
Browse files Browse the repository at this point in the history
MLH-173 Quick Fix to relieve WF runs on exelixis
  • Loading branch information
nikhilbonte21 authored Mar 5, 2025
2 parents ec7caa9 + 36bca4d commit dbfc853
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2991,7 +2991,8 @@ private AtlasEdge updateRelationship(AtlasEdge currentEdge, final AtlasVertex pa
String newEntityId = getIdFromVertex(newEntityVertex);
AtlasEdge ret = currentEdge;

if (!currentEntityId.equals(newEntityId)) {
if (StringUtils.isEmpty(currentEntityId) || !currentEntityId.equals(newEntityId)) {
// Checking if currentEntityId is null or empty as corrupted vertex on the other side of the edge should result into creation of new edge
// create a new relationship edge to the new attribute vertex from the instance
String relationshipName = AtlasGraphUtilsV2.getTypeName(currentEdge);

Expand Down Expand Up @@ -3068,11 +3069,15 @@ private List<AtlasEdge> removeUnusedArrayEntries(AtlasAttribute attribute, List<
continue;
}

boolean deleted = deleteDelegate.getHandler().deleteEdgeReference(edge, entryType.getTypeCategory(), attribute.isOwnedRef(),
true, attribute.getRelationshipEdgeDirection(), entityVertex);
try {
boolean deleted = deleteDelegate.getHandler().deleteEdgeReference(edge, entryType.getTypeCategory(), attribute.isOwnedRef(),
true, attribute.getRelationshipEdgeDirection(), entityVertex);

if (!deleted) {
additionalElements.add(edge);
if (!deleted) {
additionalElements.add(edge);
}
} catch (NullPointerException npe) {
LOG.warn("Ignoring deleting edge with corrupted vertex: {}", edge.getId());
}
}

Expand Down

0 comments on commit dbfc853

Please sign in to comment.