From 2ed874e01b42401848d347d8501d90bb7edc0baa Mon Sep 17 00:00:00 2001 From: hr2904 Date: Sun, 27 Oct 2024 22:42:46 +0530 Subject: [PATCH] Fixed the check for ES<>Cassandra extra check --- .../atlas/repository/store/graph/v2/EntityGraphMapper.java | 4 ++-- 1 file changed, 2 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 0ea3a17d2c..6fc989f8a2 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 @@ -3570,7 +3570,7 @@ public void deleteClassification(String entityGuid, String classificationName) t // Get in progress task to see if there already is a propagation for this particular vertex List inProgressTasks = taskManagement.getInProgressTasks(); for (AtlasTask task : inProgressTasks) { - if (isTaskMatchingWithVertexIdAndEntityGuid(task, classificationVertex.getIdForDisplay(), entityGuid)) { + if (IN_PROGRESS.equals(task.getStatus()) && isTaskMatchingWithVertexIdAndEntityGuid(task, classificationVertex.getIdForDisplay(), entityGuid)) { throw new AtlasBaseException(AtlasErrorCode.CLASSIFICATION_CURRENTLY_BEING_PROPAGATED, classificationName); } } @@ -3670,7 +3670,7 @@ public void deleteClassification(String entityGuid, String classificationName) t private boolean isTaskMatchingWithVertexIdAndEntityGuid(AtlasTask task, String classificationVertexId, String entityGuid) { try { - if (CLASSIFICATION_PROPAGATION_ADD.equals(task.getType()) && IN_PROGRESS.equals(task.getStatus())) { + if (CLASSIFICATION_PROPAGATION_ADD.equals(task.getType())) { return task.getParameters().get(ClassificationTask.PARAM_CLASSIFICATION_VERTEX_ID).equals(classificationVertexId) && task.getParameters().get(ClassificationTask.PARAM_ENTITY_GUID).equals(entityGuid); }