From 2fd7a3fba897273d10a27cf40067a67dadc15dd2 Mon Sep 17 00:00:00 2001 From: Pavan Manish Date: Sun, 2 Mar 2025 17:59:51 +0530 Subject: [PATCH] Resolve references before deleting --- .../src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java b/intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java index 0c3fa8c8b7..621de103ec 100644 --- a/intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java +++ b/intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java @@ -637,6 +637,8 @@ public void updateTypesWithNoRefResolve(AtlasTypesDef typesDef) throws AtlasBase } public void removeTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { + resolveReferences(); + if (null != typesDef && !typesDef.isEmpty()) { removeTypesWithNoRefResolve(typesDef.getEnumDefs()); removeTypesWithNoRefResolve(typesDef.getStructDefs()); @@ -646,7 +648,6 @@ public void removeTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { removeTypesWithNoRefResolve(typesDef.getBusinessMetadataDefs()); } - resolveReferences(); } private void removeTypesWithNoRefResolve(Collection typeDefs) {