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

MLH-173 Quick Fix to relieve WF runs on exelixis #4362

Merged
merged 1 commit into from
Mar 5, 2025
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 @@ -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
Loading