From 0a11b306f08ab036cf5a5c14ff7e8568d4fe45b2 Mon Sep 17 00:00:00 2001 From: zhangao_za <18829237393@163.com> Date: Thu, 14 Sep 2023 16:10:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddss=E5=83=B5=E6=AD=BB?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cm_agent/cma_instance_management_res.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/cm_agent/cma_instance_management_res.cpp b/src/cm_agent/cma_instance_management_res.cpp index d32c273..ffeb664 100644 --- a/src/cm_agent/cma_instance_management_res.cpp +++ b/src/cm_agent/cma_instance_management_res.cpp @@ -398,17 +398,15 @@ static void ProcessAbnormalInstance(CmResConfList *conf) return; } - write_runlog(LOG, "res(%s) inst(%u) has been abnormal (%d)s, >= timeout(%d)s, need restart.\n", + write_runlog(LOG, "res(%s) inst(%u) has been abnormal (%d)s, >= timeout(%d)s, need kill it.\n", conf->resName, conf->cmInstanceId, duration, conf->checkInfo.abnormalTimeout); - RestartOneResInst(conf); - conf->checkInfo.startCount++; - conf->checkInfo.startTime = curTime; - - if (conf->checkInfo.restartTimes != -1) { - write_runlog(LOG, "res(%s) inst(%u) has been restart (%d) times, restart more (%d) time will manually stop.\n", - conf->resName, conf->cmInstanceId, conf->checkInfo.startCount, conf->checkInfo.restartTimes); + if (CleanOneResInst(conf) == CM_SUCCESS) { + write_runlog(LOG, "res(%s) inst(%u) clean abnormal time.\n", conf->resName, conf->cmInstanceId); + } else { + conf->checkInfo.startCount++; } + conf->checkInfo.startTime = curTime; } static inline bool NeedStopResInst(const char *resName, uint32 cmInstId)