From 547a26dfe3e0f85e3ebfd96065be714cf14be0cb Mon Sep 17 00:00:00 2001 From: Andy Zhang Date: Wed, 18 Dec 2024 12:29:39 -0800 Subject: [PATCH] log refactor --- .../java/io/mantisrx/master/jobcluster/job/JobActor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/job/JobActor.java b/mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/job/JobActor.java index 69005b140..b879b8be5 100644 --- a/mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/job/JobActor.java +++ b/mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/job/JobActor.java @@ -1943,18 +1943,18 @@ public void checkHeartBeats(Instant currentTime) { acceptedAt); } } else { + // no heartbeat or heartbeat too old if (!workerMeta.getLastHeartbeatAt().isPresent() || Duration.between(workerMeta.getLastHeartbeatAt().get(), currentTime).getSeconds() > missedHeartBeatToleranceSecs) { - // no heartbeat or heartbeat too old this.numWorkerMissingHeartbeat.increment(); if (!workerMeta.getLastHeartbeatAt().isPresent()) { - LOGGER.info("Job {}, Worker {} hasn't received heartbeat, threshold {} exceeded", + LOGGER.warn("Job {}, Worker {} hasn't received heartbeat, threshold {} exceeded", this.jobMgr.getJobId(), workerMeta.getWorkerId(), missedHeartBeatToleranceSecs); } else { - LOGGER.info("Job {}, Worker {} Duration between last heartbeat and now {} " + LOGGER.warn("Job {}, Worker {} Duration between last heartbeat and now {} " + "missed heart beat threshold {} exceeded", this.jobMgr.getJobId(), workerMeta.getWorkerId(),