提交 07f26ddc 编写于 作者: Y yihaoDeng

[TD-3178]<feature> fix some bug

上级 cad3b55a
...@@ -194,7 +194,7 @@ static int32_t dnodeProcessCompactVnodeMsg(SRpcMsg *rpcMsg) { ...@@ -194,7 +194,7 @@ static int32_t dnodeProcessCompactVnodeMsg(SRpcMsg *rpcMsg) {
SCompactVnodeMsg *pCompactVnode = rpcMsg->pCont; SCompactVnodeMsg *pCompactVnode = rpcMsg->pCont;
pCompactVnode->vgId = htonl(pCompactVnode->vgId); pCompactVnode->vgId = htonl(pCompactVnode->vgId);
//do nothing //do nothing
dDebug("trige compact at vgid: %d", pCompactVnode->vgId); dDebug("trigger compact at vgid: %d", pCompactVnode->vgId);
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
......
...@@ -993,11 +993,11 @@ static void mnodeSendSyncVnodeMsg(SVgObj *pVgroup, SRpcEpSet *epSet) { ...@@ -993,11 +993,11 @@ static void mnodeSendSyncVnodeMsg(SVgObj *pVgroup, SRpcEpSet *epSet) {
dnodeSendMsgToDnode(epSet, &rpcMsg); dnodeSendMsgToDnode(epSet, &rpcMsg);
} }
static void mnodeSendCompactVnodeMsg(SVgObj *pVgroup, SRpcEpSet *epSet) { static void mnodeSendCompactVnodeMsg(SVgObj *pVgroup, SRpcEpSet *epSet) {
SSyncVnodeMsg *pSyncVnode = mnodeBuildSyncVnodeMsg(pVgroup->vgId); SCompactVnodeMsg *pCompactVnode = mnodeBuildSyncVnodeMsg(pVgroup->vgId);
SRpcMsg rpcMsg = { SRpcMsg rpcMsg = {
.ahandle = NULL, .ahandle = NULL,
.pCont = pSyncVnode, .pCont = pCompactVnode,
.contLen = pSyncVnode ? sizeof(SCompactVnodeMsg) : 0, .contLen = pCompactVnode ? sizeof(SCompactVnodeMsg) : 0,
.code = 0, .code = 0,
.msgType = TSDB_MSG_TYPE_MD_COMPACT_VNODE .msgType = TSDB_MSG_TYPE_MD_COMPACT_VNODE
}; };
...@@ -1020,7 +1020,7 @@ void mnodeSendSyncVgroupMsg(SVgObj *pVgroup) { ...@@ -1020,7 +1020,7 @@ void mnodeSendSyncVgroupMsg(SVgObj *pVgroup) {
void mnodeSendCompactVgroupMsg(SVgObj *pVgroup) { void mnodeSendCompactVgroupMsg(SVgObj *pVgroup) {
mDebug("vgId:%d, send compact all vnodes msg, numOfVnodes:%d db:%s", pVgroup->vgId, pVgroup->numOfVnodes, pVgroup->dbName); 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) { 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); SRpcEpSet epSet = mnodeGetEpSetFromIp(pVgroup->vnodeGid[i].pDnode->dnodeEp);
mDebug("vgId:%d, index:%d, send compact vnode msg to dnode %s", pVgroup->vgId, i, mDebug("vgId:%d, index:%d, send compact vnode msg to dnode %s", pVgroup->vgId, i,
pVgroup->vnodeGid[i].pDnode->dnodeEp); pVgroup->vnodeGid[i].pDnode->dnodeEp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册