From 13475700c5792979edcbb99a34854642612d91e8 Mon Sep 17 00:00:00 2001 From: dongming chen Date: Tue, 25 Mar 2025 12:37:20 +0800 Subject: [PATCH] enh: [TD-34190] remove-wrong-log (#30408) --- source/dnode/mnode/impl/src/mndArbGroup.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndArbGroup.c b/source/dnode/mnode/impl/src/mndArbGroup.c index af56283c96..0c3f53ca4f 100644 --- a/source/dnode/mnode/impl/src/mndArbGroup.c +++ b/source/dnode/mnode/impl/src/mndArbGroup.c @@ -20,6 +20,7 @@ #include "mndShow.h" #include "mndTrans.h" #include "mndVgroup.h" +#include "mndSync.h" #define ARBGROUP_VER_NUMBER 1 #define ARBGROUP_RESERVE_SIZE 51 @@ -266,8 +267,10 @@ static int32_t mndArbGroupActionUpdate(SSdb *pSdb, SArbGroup *pOld, SArbGroup *p _OVER: (void)taosThreadMutexUnlock(&pOld->mutex); - if (taosHashRemove(arbUpdateHash, &pOld->vgId, sizeof(int32_t)) != 0) { - mError("arbgroup:%d, failed to remove from arbUpdateHash", pOld->vgId); + if (mndIsLeader(pSdb->pMnode)) { + if (taosHashRemove(arbUpdateHash, &pOld->vgId, sizeof(int32_t)) != 0) { + mError("arbgroup:%d, failed to remove from arbUpdateHash", pOld->vgId); + } } return 0; }