From 07f26ddc12acf7f1ff83bb76075026350901014c Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 26 May 2021 19:34:21 +0800 Subject: [PATCH] [TD-3178] fix some bug --- src/dnode/src/dnodeVMgmt.c | 2 +- src/mnode/src/mnodeVgroup.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dnode/src/dnodeVMgmt.c b/src/dnode/src/dnodeVMgmt.c index d270ca7ea9..c5f7f2add3 100644 --- a/src/dnode/src/dnodeVMgmt.c +++ b/src/dnode/src/dnodeVMgmt.c @@ -194,7 +194,7 @@ static int32_t dnodeProcessCompactVnodeMsg(SRpcMsg *rpcMsg) { SCompactVnodeMsg *pCompactVnode = rpcMsg->pCont; pCompactVnode->vgId = htonl(pCompactVnode->vgId); //do nothing - dDebug("trige compact at vgid: %d", pCompactVnode->vgId); + dDebug("trigger compact at vgid: %d", pCompactVnode->vgId); return TSDB_CODE_SUCCESS; } diff --git a/src/mnode/src/mnodeVgroup.c b/src/mnode/src/mnodeVgroup.c index 666de96854..b61c18f495 100644 --- a/src/mnode/src/mnodeVgroup.c +++ b/src/mnode/src/mnodeVgroup.c @@ -993,11 +993,11 @@ static void mnodeSendSyncVnodeMsg(SVgObj *pVgroup, SRpcEpSet *epSet) { dnodeSendMsgToDnode(epSet, &rpcMsg); } static void mnodeSendCompactVnodeMsg(SVgObj *pVgroup, SRpcEpSet *epSet) { - SSyncVnodeMsg *pSyncVnode = mnodeBuildSyncVnodeMsg(pVgroup->vgId); + SCompactVnodeMsg *pCompactVnode = mnodeBuildSyncVnodeMsg(pVgroup->vgId); SRpcMsg rpcMsg = { .ahandle = NULL, - .pCont = pSyncVnode, - .contLen = pSyncVnode ? sizeof(SCompactVnodeMsg) : 0, + .pCont = pCompactVnode, + .contLen = pCompactVnode ? sizeof(SCompactVnodeMsg) : 0, .code = 0, .msgType = TSDB_MSG_TYPE_MD_COMPACT_VNODE }; @@ -1020,7 +1020,7 @@ void mnodeSendSyncVgroupMsg(SVgObj *pVgroup) { void mnodeSendCompactVgroupMsg(SVgObj *pVgroup) { mDebug("vgId:%d, send compact all vnodes msg, numOfVnodes:%d db:%s", pVgroup->vgId, pVgroup->numOfVnodes, pVgroup->dbName); for (int32_t i = 0; i < pVgroup->numOfVnodes; ++i) { - if (pVgroup->vnodeGid[i].role != TAOS_SYNC_ROLE_SLAVE) continue; //TODO(yihaoDeng): compact slave or not ? + //if (pVgroup->vnodeGid[i].role != TAOS_SYNC_ROLE_SLAVE) continue; //TODO(yihaoDeng): compact slave or not ? SRpcEpSet epSet = mnodeGetEpSetFromIp(pVgroup->vnodeGid[i].pDnode->dnodeEp); mDebug("vgId:%d, index:%d, send compact vnode msg to dnode %s", pVgroup->vgId, i, pVgroup->vnodeGid[i].pDnode->dnodeEp); -- GitLab