fix: status msg
This commit is contained in:
parent
1a22de765c
commit
c8d5575030
|
@ -92,7 +92,11 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) {
|
||||||
SEpSet epSet = {0};
|
SEpSet epSet = {0};
|
||||||
dmGetMnodeEpSet(pMgmt->pData, &epSet);
|
dmGetMnodeEpSet(pMgmt->pData, &epSet);
|
||||||
rpcSendRecv(pMgmt->msgCb.clientRpc, &epSet, &rpcMsg, &rpcRsp);
|
rpcSendRecv(pMgmt->msgCb.clientRpc, &epSet, &rpcMsg, &rpcRsp);
|
||||||
dmProcessStatusRsp(pMgmt, &rpcRsp);
|
if (rpcRsp.code != 0) {
|
||||||
|
dError("failed to send status msg since %s", tstrerror(rpcRsp.code));
|
||||||
|
} else {
|
||||||
|
dmProcessStatusRsp(pMgmt, &rpcRsp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t dmProcessAuthRsp(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
int32_t dmProcessAuthRsp(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
||||||
|
|
|
@ -144,6 +144,7 @@ _OVER:
|
||||||
|
|
||||||
static int32_t mndClusterActionInsert(SSdb *pSdb, SClusterObj *pCluster) {
|
static int32_t mndClusterActionInsert(SSdb *pSdb, SClusterObj *pCluster) {
|
||||||
mTrace("cluster:%" PRId64 ", perform insert action, row:%p", pCluster->id, pCluster);
|
mTrace("cluster:%" PRId64 ", perform insert action, row:%p", pCluster->id, pCluster);
|
||||||
|
pSdb->pMnode->clusterId = pCluster->id;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -441,7 +441,7 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
|
||||||
pDnode->numOfSupportVnodes = statusReq.numOfSupportVnodes;
|
pDnode->numOfSupportVnodes = statusReq.numOfSupportVnodes;
|
||||||
|
|
||||||
SStatusRsp statusRsp = {0};
|
SStatusRsp statusRsp = {0};
|
||||||
statusRsp.dnodeVer = sdbGetTableVer(pMnode->pSdb, SDB_DNODE);
|
statusRsp.dnodeVer = sdbGetTableVer(pMnode->pSdb, SDB_DNODE) + sdbGetTableVer(pMnode->pSdb, SDB_MNODE);
|
||||||
statusRsp.dnodeCfg.dnodeId = pDnode->id;
|
statusRsp.dnodeCfg.dnodeId = pDnode->id;
|
||||||
statusRsp.dnodeCfg.clusterId = pMnode->clusterId;
|
statusRsp.dnodeCfg.clusterId = pMnode->clusterId;
|
||||||
statusRsp.pDnodeEps = taosArrayInit(mndGetDnodeSize(pMnode), sizeof(SDnodeEp));
|
statusRsp.pDnodeEps = taosArrayInit(mndGetDnodeSize(pMnode), sizeof(SDnodeEp));
|
||||||
|
|
Loading…
Reference in New Issue