minor changes
This commit is contained in:
parent
f0e697479f
commit
d2253e0b72
|
@ -609,14 +609,12 @@ static int32_t mndProcessConfigDnodeReq(SMnodeMsg *pReq) {
|
||||||
SEpSet epSet = mndGetDnodeEpset(pDnode);
|
SEpSet epSet = mndGetDnodeEpset(pDnode);
|
||||||
mndReleaseDnode(pMnode, pDnode);
|
mndReleaseDnode(pMnode, pDnode);
|
||||||
|
|
||||||
SDCfgDnodeReq *pCfgDnode = rpcMallocCont(sizeof(SDCfgDnodeReq));
|
int32_t bufLen = tSerializeSMCfgDnodeReq(NULL, 0, &cfgReq);
|
||||||
pCfgDnode->dnodeId = htonl(cfgReq.dnodeId);
|
void *pBuf = rpcMallocCont(bufLen);
|
||||||
memcpy(pCfgDnode->config, cfgReq.config, TSDB_DNODE_CONFIG_LEN);
|
tSerializeSMCfgDnodeReq(pBuf, bufLen, &cfgReq);
|
||||||
|
|
||||||
SRpcMsg rpcMsg = {.msgType = TDMT_DND_CONFIG_DNODE,
|
SRpcMsg rpcMsg = {
|
||||||
.pCont = pCfgDnode,
|
.msgType = TDMT_DND_CONFIG_DNODE, .pCont = pBuf, .contLen = bufLen, .ahandle = pReq->rpcMsg.ahandle};
|
||||||
.contLen = sizeof(SDCfgDnodeReq),
|
|
||||||
.ahandle = pReq->rpcMsg.ahandle};
|
|
||||||
|
|
||||||
mInfo("dnode:%d, app:%p config:%s req send to dnode", cfgReq.dnodeId, rpcMsg.ahandle, cfgReq.config);
|
mInfo("dnode:%d, app:%p config:%s req send to dnode", cfgReq.dnodeId, rpcMsg.ahandle, cfgReq.config);
|
||||||
mndSendReqToDnode(pMnode, &epSet, &rpcMsg);
|
mndSendReqToDnode(pMnode, &epSet, &rpcMsg);
|
||||||
|
|
|
@ -223,8 +223,8 @@ void *mndBuildCreateVnodeReq(SMnode *pMnode, SDnodeObj *pDnode, SDbObj *pDb, SVg
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pReplica->id = htonl(pVgidDnode->id);
|
pReplica->id = pVgidDnode->id;
|
||||||
pReplica->port = htons(pVgidDnode->port);
|
pReplica->port = pVgidDnode->port;
|
||||||
memcpy(pReplica->fqdn, pVgidDnode->fqdn, TSDB_FQDN_LEN);
|
memcpy(pReplica->fqdn, pVgidDnode->fqdn, TSDB_FQDN_LEN);
|
||||||
mndReleaseDnode(pMnode, pVgidDnode);
|
mndReleaseDnode(pMnode, pVgidDnode);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue