sync io
This commit is contained in:
parent
3e591a022c
commit
a2d9cd4403
|
@ -188,7 +188,7 @@ static void *syncIOConsumerFunc(void *param) {
|
||||||
SSyncIO *io = param;
|
SSyncIO *io = param;
|
||||||
|
|
||||||
STaosQall *qall;
|
STaosQall *qall;
|
||||||
SRpcMsg * pRpcMsg, rpcMsg;
|
SRpcMsg *pRpcMsg, rpcMsg;
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
qall = taosAllocateQall();
|
qall = taosAllocateQall();
|
||||||
|
|
|
@ -46,12 +46,25 @@ void syncUtilraftId2EpSet(const SRaftId* raftId, SEpSet* pEpSet) {
|
||||||
uint16_t port;
|
uint16_t port;
|
||||||
|
|
||||||
syncUtilU642Addr(raftId->addr, host, sizeof(host), &port);
|
syncUtilU642Addr(raftId->addr, host, sizeof(host), &port);
|
||||||
|
|
||||||
|
/*
|
||||||
|
pEpSet->numOfEps = 1;
|
||||||
|
pEpSet->inUse = 0;
|
||||||
|
pEpSet->eps[0].port = port;
|
||||||
|
snprintf(epSet.eps[0].fqdn, sizeof(epSet.eps[0].fqdn), host);
|
||||||
|
*/
|
||||||
|
|
||||||
pEpSet->inUse = 0;
|
pEpSet->inUse = 0;
|
||||||
|
pEpSet->numOfEps = 1;
|
||||||
addEpIntoEpSet(pEpSet, host, port);
|
addEpIntoEpSet(pEpSet, host, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncUtilnodeInfo2raftId(const SNodeInfo* pNodeInfo, SyncGroupId vgId, SRaftId* raftId) {
|
void syncUtilnodeInfo2raftId(const SNodeInfo* pNodeInfo, SyncGroupId vgId, SRaftId* raftId) {
|
||||||
raftId->addr = syncUtilAddr2U64(pNodeInfo->nodeFqdn, pNodeInfo->nodePort);
|
uint32_t ipv4 = taosGetIpv4FromFqdn(pNodeInfo->nodeFqdn);
|
||||||
|
assert(ipv4 != 0xFFFFFFFF);
|
||||||
|
char ipbuf[128];
|
||||||
|
tinet_ntoa(ipbuf, ipv4);
|
||||||
|
raftId->addr = syncUtilAddr2U64(ipbuf, pNodeInfo->nodePort);
|
||||||
raftId->vgId = vgId;
|
raftId->vgId = vgId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue