commit
35564ae8f3
|
@ -106,13 +106,14 @@ static void tscUpdateVgroupInfo(SSqlObj *pObj, SRpcEpSet *pEpSet) {
|
||||||
SCMCorVgroupInfo *pVgroupInfo = &pTableMetaInfo->pTableMeta->corVgroupInfo;
|
SCMCorVgroupInfo *pVgroupInfo = &pTableMetaInfo->pTableMeta->corVgroupInfo;
|
||||||
|
|
||||||
taosCorBeginWrite(&pVgroupInfo->version);
|
taosCorBeginWrite(&pVgroupInfo->version);
|
||||||
//TODO(dengyihao), dont care vgid
|
tscDebug("before: Endpoint in use: %d", pVgroupInfo->inUse);
|
||||||
pVgroupInfo->inUse = pEpSet->inUse;
|
pVgroupInfo->inUse = pEpSet->inUse;
|
||||||
pVgroupInfo->numOfEps = pEpSet->numOfEps;
|
pVgroupInfo->numOfEps = pEpSet->numOfEps;
|
||||||
for (int32_t i = 0; pVgroupInfo->numOfEps; i++) {
|
for (int32_t i = 0; i < pVgroupInfo->numOfEps; i++) {
|
||||||
strncpy(pVgroupInfo->epAddr[i].fqdn, pEpSet->fqdn[i], TSDB_FQDN_LEN);
|
strncpy(pVgroupInfo->epAddr[i].fqdn, pEpSet->fqdn[i], TSDB_FQDN_LEN);
|
||||||
pVgroupInfo->epAddr[i].port = pEpSet->port[i];
|
pVgroupInfo->epAddr[i].port = pEpSet->port[i];
|
||||||
}
|
}
|
||||||
|
tscDebug("after: EndPoint in use: %d", pVgroupInfo->inUse);
|
||||||
taosCorEndWrite(&pVgroupInfo->version);
|
taosCorEndWrite(&pVgroupInfo->version);
|
||||||
}
|
}
|
||||||
void tscPrintMgmtEp() {
|
void tscPrintMgmtEp() {
|
||||||
|
@ -283,9 +284,7 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pEpSet) {
|
if (pEpSet) {
|
||||||
//SRpcEpSet dump;
|
if (!tscEpSetIsEqual(&pSql->epSet, pEpSet)) {
|
||||||
tscEpSetHtons(pEpSet);
|
|
||||||
if (tscEpSetIsEqual(&pSql->epSet, pEpSet)) {
|
|
||||||
if(pCmd->command < TSDB_SQL_MGMT) {
|
if(pCmd->command < TSDB_SQL_MGMT) {
|
||||||
tscUpdateVgroupInfo(pSql, pEpSet);
|
tscUpdateVgroupInfo(pSql, pEpSet);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue