From 781124fca680ee3a027382066cc9ac1c71a32648 Mon Sep 17 00:00:00 2001 From: malakaganga Date: Fri, 25 Oct 2024 08:10:47 +0530 Subject: [PATCH] Remove redundent logic after imp for coordination Fixes: https://github.com/wso2/micro-integrator/issues/3693 --- .../coordination/task/TaskEventListener.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/coordination/task/TaskEventListener.java b/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/coordination/task/TaskEventListener.java index 98ea8f0e6a..e5daf52a5c 100644 --- a/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/coordination/task/TaskEventListener.java +++ b/components/mediation/tasks/org.wso2.micro.integrator.ntask.core/src/main/java/org/wso2/micro/integrator/ntask/coordination/task/TaskEventListener.java @@ -75,12 +75,6 @@ public void memberAdded(NodeDetail nodeDetail) { LOG.error("Exception occurred while resolving un assigned tasks upon member addition " + nodeDetail .getNodeId(), e); } - } else if (clusterCoordinator.getThisNodeId().equals(nodeDetail.getNodeId()) - && isMemberRejoinedAfterUnresponsiveness()) { - // This node became unresponsive and rejoined the cluster hence removing all tasks assigned to this node - // then start the scheduler again after cleaning the locally running tasks. - becameUnresponsive(nodeDetail.getNodeId()); - reJoined(nodeDetail.getNodeId(), null); } } @@ -134,15 +128,6 @@ public void becameUnresponsive(String nodeId) { } } - /** - * Check whether the member has rejoined after being unresponsive. - * - * @return true if the member has rejoined after being unresponsive, false otherwise - */ - public boolean isMemberRejoinedAfterUnresponsiveness() { - return taskManager.getLocallyRunningCoordinatedTasks().size() > 0; - } - @Override public void reJoined(String nodeId, RDBMSMemberEventCallBack callBack) {