split sync/status channel
This commit is contained in:
parent
b5e5167b8f
commit
df235b0adf
|
@ -161,7 +161,7 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) {
|
||||||
SEpSet epSet = {0};
|
SEpSet epSet = {0};
|
||||||
int8_t epUpdated = 0;
|
int8_t epUpdated = 0;
|
||||||
dmGetMnodeEpSet(pMgmt->pData, &epSet);
|
dmGetMnodeEpSet(pMgmt->pData, &epSet);
|
||||||
rpcSendRecvWithTimeout(pMgmt->msgCb.statusRpc, &epSet, &rpcMsg, &rpcRsp, &epUpdated, tsStatusInterval * 10);
|
rpcSendRecvWithTimeout(pMgmt->msgCb.statusRpc, &epSet, &rpcMsg, &rpcRsp, &epUpdated, tsStatusInterval * 10 * 1000);
|
||||||
if (rpcRsp.code != 0) {
|
if (rpcRsp.code != 0) {
|
||||||
dmRotateMnodeEpSet(pMgmt->pData);
|
dmRotateMnodeEpSet(pMgmt->pData);
|
||||||
char tbuf[512];
|
char tbuf[512];
|
||||||
|
|
|
@ -2701,6 +2701,7 @@ int transSendRecvWithTimeout(void* shandle, SEpSet* pEpSet, STransMsg* pReq, STr
|
||||||
ret = TSDB_CODE_TIMEOUT_ERROR;
|
ret = TSDB_CODE_TIMEOUT_ERROR;
|
||||||
} else {
|
} else {
|
||||||
memcpy(pRsp, pSyncMsg->pRsp, sizeof(STransMsg));
|
memcpy(pRsp, pSyncMsg->pRsp, sizeof(STransMsg));
|
||||||
|
pSyncMsg->pRsp->pCont = NULL;
|
||||||
if (pSyncMsg->hasEpSet == 1) {
|
if (pSyncMsg->hasEpSet == 1) {
|
||||||
epsetAssign(pEpSet, &pSyncMsg->epSet);
|
epsetAssign(pEpSet, &pSyncMsg->epSet);
|
||||||
*epUpdated = 1;
|
*epUpdated = 1;
|
||||||
|
|
|
@ -667,7 +667,7 @@ void transDestroySyncMsg(void* msg) {
|
||||||
STransSyncMsg* pSyncMsg = msg;
|
STransSyncMsg* pSyncMsg = msg;
|
||||||
tsem_destroy(pSyncMsg->pSem);
|
tsem_destroy(pSyncMsg->pSem);
|
||||||
taosMemoryFree(pSyncMsg->pSem);
|
taosMemoryFree(pSyncMsg->pSem);
|
||||||
|
transFreeMsg(pSyncMsg->pRsp->pCont);
|
||||||
taosMemoryFree(pSyncMsg->pRsp);
|
taosMemoryFree(pSyncMsg->pRsp);
|
||||||
taosMemoryFree(pSyncMsg);
|
taosMemoryFree(pSyncMsg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue