diff --git a/source/dnode/mnode/impl/src/mndArbGroup.c b/source/dnode/mnode/impl/src/mndArbGroup.c index 281295eba8..e8c8df328d 100644 --- a/source/dnode/mnode/impl/src/mndArbGroup.c +++ b/source/dnode/mnode/impl/src/mndArbGroup.c @@ -404,7 +404,7 @@ static int32_t mndProcessArbHbTimer(SRpcMsg *pReq) { hbMembers = *(SArray **)pObj; } else { hbMembers = taosArrayInit(16, sizeof(SVArbHbReqMember)); - if (taosHashPut(pDnodeHash, &dnodeId, sizeof(int32_t), &hbMembers, POINTER_BYTES) == 0) { + if (taosHashPut(pDnodeHash, &dnodeId, sizeof(int32_t), &hbMembers, POINTER_BYTES) != 0) { mError("dnodeId:%d, failed to push hb member inty]o hash, but conitnue next at this timer round", dnodeId); } } diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index e940948fae..9890f3222b 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -2167,17 +2167,9 @@ static int32_t refreshNodeListFromExistedStreams(SMnode *pMnode, SArray *pNodeLi SNodeEntry entry = {.hbTimestamp = -1, .nodeId = pTask->info.nodeId, .lastHbMsgId = -1}; epsetAssign(&entry.epset, &pTask->info.epSet); - (void)taosHashPut(pHash, &entry.nodeId, sizeof(entry.nodeId), &entry, sizeof(entry)); - /* - if (taosHashPut(pHash, &entry.nodeId, sizeof(entry.nodeId), &entry, sizeof(entry)) == 0) { - code = terrno; - taosWUnLockLatch(&pStream->lock); - sdbRelease(pSdb, pStream); - destroyStreamTaskIter(pTaskIter); - taosArrayClear(pNodeList); - return code; + if (taosHashPut(pHash, &entry.nodeId, sizeof(entry.nodeId), &entry, sizeof(entry)) != 0) { + mError("failed to put entry into hash map, nodeId:%d", entry.nodeId); } - */ } destroyStreamTaskIter(pTaskIter); diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index b2ce83fbc6..176b39f92e 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -768,7 +768,7 @@ void mndTransSetDbName(STrans *pTrans, const char *dbname, const char *stbname) } void mndTransAddArbGroupId(STrans *pTrans, int32_t groupId) { - if (taosHashPut(pTrans->arbGroupIds, &groupId, sizeof(int32_t), NULL, 0) == 0) { + if (taosHashPut(pTrans->arbGroupIds, &groupId, sizeof(int32_t), NULL, 0) != 0) { mError("trans:%d, failed to put groupid into hash, groupId:%d", pTrans->id, groupId); } }