From 5538b0c2fcdc2ba67a848b7cf11ab158ebaa28e1 Mon Sep 17 00:00:00 2001 From: Nikhil P Bonte Date: Tue, 12 Dec 2023 23:36:57 +0530 Subject: [PATCH 1/2] Refactoring --- .../store/graph/v2/ClassificationAssociator.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/ClassificationAssociator.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/ClassificationAssociator.java index 15c52f6e15..85bb85fe9b 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/ClassificationAssociator.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/ClassificationAssociator.java @@ -310,12 +310,14 @@ private void deleteClassifications(String entityGuid, String typeName, List Date: Tue, 12 Dec 2023 23:41:45 +0530 Subject: [PATCH 2/2] Refactoring --- .../atlas/repository/store/graph/v2/EntityGraphMapper.java | 2 -- server-api/src/main/java/org/apache/atlas/RequestContext.java | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java index 7db0e70c67..f1cf55767a 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java @@ -201,7 +201,6 @@ public class EntityGraphMapper { private final IAtlasEntityChangeNotifier entityChangeNotifier; private final AtlasInstanceConverter instanceConverter; private final EntityGraphRetriever entityRetriever; - private final EntityGraphRetriever entityRetrieverNoRelation; private final IFullTextMapper fullTextMapperV2; private final TaskManagement taskManagement; private final TransactionInterceptHelper transactionInterceptHelper; @@ -220,7 +219,6 @@ public EntityGraphMapper(DeleteHandlerDelegate deleteDelegate, RestoreHandlerV1 this.entityChangeNotifier = entityChangeNotifier; this.instanceConverter = instanceConverter; this.entityRetriever = new EntityGraphRetriever(graph, typeRegistry); - this.entityRetrieverNoRelation = new EntityGraphRetriever(graph, typeRegistry, true); this.fullTextMapperV2 = fullTextMapperV2; this.taskManagement = taskManagement; this.transactionInterceptHelper = transactionInterceptHelper; diff --git a/server-api/src/main/java/org/apache/atlas/RequestContext.java b/server-api/src/main/java/org/apache/atlas/RequestContext.java index b9cb050e2f..fb95138c93 100644 --- a/server-api/src/main/java/org/apache/atlas/RequestContext.java +++ b/server-api/src/main/java/org/apache/atlas/RequestContext.java @@ -160,6 +160,9 @@ public void clearCache() { this.relationshipMutationMap.clear(); this.currentTask = null; this.skipAuthorizationCheck = false; + this.delayTagNotifications = false; + deletedClassificationAndVertices.clear(); + addedClassificationAndVertices.clear(); if (metrics != null && !metrics.isEmpty()) { METRICS.debug(metrics.toString());