From 7734dbd6541a79b738b21ed5229bddf769e3579d Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 4 Dec 2020 04:43:00 +0530 Subject: [PATCH] Fixing issue with candidate election --- .../beacon/service/HeartBeatManagementServiceImpl.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/src/main/java/io/entgra/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java b/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/src/main/java/io/entgra/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java index cd70914d46..cb9fbb8568 100644 --- a/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/src/main/java/io/entgra/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java +++ b/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/src/main/java/io/entgra/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java @@ -212,10 +212,8 @@ public class HeartBeatManagementServiceImpl implements HeartBeatManagementServic presentCandidate.getTimeOfElection().before(new Timestamp(System.currentTimeMillis() - TimeUnit.SECONDS.toMillis(elapsedTimeInSeconds)))) { heartBeatDAO.purgeCandidates(); - electCandidate(servers); - } else { - electCandidate(servers); } + electCandidate(servers); HeartBeatBeaconDAOFactory.commitTransaction(); } } catch (HeartBeatDAOException e) {