fix the bug in sync integration
This commit is contained in:
parent
64e59d9463
commit
3899ae8707
|
@ -934,6 +934,9 @@ static void rpcProcessIncomingMsg(SRpcConn *pConn, SRpcHead *pHead) {
|
|||
memcpy(&pContext->ipSet, pHead->content, sizeof(pContext->ipSet));
|
||||
tTrace("%s %p, redirect is received, numOfIps:%d", pRpc->label, pConn, pContext->ipSet.numOfIps);
|
||||
rpcSendReqToServer(pRpc, pContext);
|
||||
} else if (pHead->code == TSDB_CODE_NOT_READY) {
|
||||
pConn->pContext->code = pHead->code;
|
||||
rpcProcessConnError(pConn->pContext, NULL);
|
||||
} else {
|
||||
rpcNotifyClient(pContext, &rpcMsg);
|
||||
}
|
||||
|
@ -1078,7 +1081,7 @@ static void rpcSendMsgToPeer(SRpcConn *pConn, void *msg, int msgLen) {
|
|||
if (pHead->msgType < TSDB_MSG_TYPE_CM_HEARTBEAT || (rpcDebugFlag & 16))
|
||||
tTrace( "%s %p, %s is sent to %s:%hu, code:0x%x len:%d sig:0x%08x:0x%08x:%d",
|
||||
pRpc->label, pConn, taosMsg[pHead->msgType], pConn->peerIpstr, pConn->peerPort,
|
||||
pHead->code, msgLen, pHead->sourceId, pHead->destId, pHead->tranId);
|
||||
htonl(pHead->code), msgLen, pHead->sourceId, pHead->destId, pHead->tranId);
|
||||
}
|
||||
|
||||
writtenLen = (*taosSendData[pConn->connType])(pConn->peerIp, pConn->peerPort, pHead, msgLen, pConn->chandle);
|
||||
|
|
|
@ -148,7 +148,7 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) {
|
|||
|
||||
SSyncInfo syncInfo;
|
||||
syncInfo.vgId = pVnode->vgId;
|
||||
syncInfo.vgId = pVnode->version;
|
||||
syncInfo.version = pVnode->version;
|
||||
syncInfo.syncCfg = pVnode->syncCfg;
|
||||
sprintf(syncInfo.path, "%s/tsdb/", rootDir);
|
||||
syncInfo.ahandle = pVnode;
|
||||
|
@ -370,7 +370,7 @@ static int32_t vnodeReadCfg(SVnodeObj *pVnode) {
|
|||
if (num != 2) return TSDB_CODE_INVALID_FILE_FORMAT;
|
||||
if (strcmp(option[0], "arbitratorIp") != 0) return TSDB_CODE_INVALID_FILE_FORMAT;
|
||||
if (arbitratorIp == -1) return TSDB_CODE_INVALID_FILE_FORMAT;
|
||||
pVnode->syncCfg.arbitratorIp = arbitratorIp;
|
||||
pVnode->syncCfg.arbitratorIp = 0;
|
||||
|
||||
int32_t quorum = -1;
|
||||
num = fscanf(fp, "%s %d", option[0], &quorum);
|
||||
|
|
|
@ -77,11 +77,8 @@ int32_t vnodeProcessWrite(void *param1, int qtype, void *param2, void *item) {
|
|||
code = (*vnodeProcessWriteMsgFp[pHead->msgType])(pVnode, pHead->cont, item);
|
||||
if (code < 0) return code;
|
||||
|
||||
/* forward
|
||||
if (pVnode->replica > 1 && pVnode->role == TAOS_SYNC_ROLE_MASTER) {
|
||||
if (pVnode->syncCfg.replica > 1)
|
||||
code = syncForwardToPeer(pVnode->sync, pHead, item);
|
||||
}
|
||||
*/
|
||||
|
||||
return code;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue