support no fqdn for single dnode
This commit is contained in:
parent
af2ba729b0
commit
45e8ec7470
|
@ -369,6 +369,7 @@ typedef struct {
|
||||||
int32_t acctId;
|
int32_t acctId;
|
||||||
int64_t clusterId;
|
int64_t clusterId;
|
||||||
uint32_t connId;
|
uint32_t connId;
|
||||||
|
int32_t dnodeNum;
|
||||||
int8_t superUser;
|
int8_t superUser;
|
||||||
int8_t connType;
|
int8_t connType;
|
||||||
SEpSet epSet;
|
SEpSet epSet;
|
||||||
|
|
|
@ -58,7 +58,7 @@ int32_t processConnectRsp(void* param, const SDataBuf* pMsg, int32_t code) {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isEpsetEqual(&pTscObj->pAppInfo->mgmtEp.epSet, &connectRsp.epSet)) {
|
if (connectRsp.dnodeNum > 1 && !isEpsetEqual(&pTscObj->pAppInfo->mgmtEp.epSet, &connectRsp.epSet)) {
|
||||||
updateEpSet_s(&pTscObj->pAppInfo->mgmtEp, &connectRsp.epSet);
|
updateEpSet_s(&pTscObj->pAppInfo->mgmtEp, &connectRsp.epSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2751,6 +2751,7 @@ int32_t tSerializeSConnectRsp(void *buf, int32_t bufLen, SConnectRsp *pRsp) {
|
||||||
if (tEncodeI32(&encoder, pRsp->acctId) < 0) return -1;
|
if (tEncodeI32(&encoder, pRsp->acctId) < 0) return -1;
|
||||||
if (tEncodeI64(&encoder, pRsp->clusterId) < 0) return -1;
|
if (tEncodeI64(&encoder, pRsp->clusterId) < 0) return -1;
|
||||||
if (tEncodeU32(&encoder, pRsp->connId) < 0) return -1;
|
if (tEncodeU32(&encoder, pRsp->connId) < 0) return -1;
|
||||||
|
if (tEncodeI32(&encoder, pRsp->dnodeNum) < 0) return -1;
|
||||||
if (tEncodeI8(&encoder, pRsp->superUser) < 0) return -1;
|
if (tEncodeI8(&encoder, pRsp->superUser) < 0) return -1;
|
||||||
if (tEncodeI8(&encoder, pRsp->connType) < 0) return -1;
|
if (tEncodeI8(&encoder, pRsp->connType) < 0) return -1;
|
||||||
if (tEncodeSEpSet(&encoder, &pRsp->epSet) < 0) return -1;
|
if (tEncodeSEpSet(&encoder, &pRsp->epSet) < 0) return -1;
|
||||||
|
@ -2770,6 +2771,7 @@ int32_t tDeserializeSConnectRsp(void *buf, int32_t bufLen, SConnectRsp *pRsp) {
|
||||||
if (tDecodeI32(&decoder, &pRsp->acctId) < 0) return -1;
|
if (tDecodeI32(&decoder, &pRsp->acctId) < 0) return -1;
|
||||||
if (tDecodeI64(&decoder, &pRsp->clusterId) < 0) return -1;
|
if (tDecodeI64(&decoder, &pRsp->clusterId) < 0) return -1;
|
||||||
if (tDecodeU32(&decoder, &pRsp->connId) < 0) return -1;
|
if (tDecodeU32(&decoder, &pRsp->connId) < 0) return -1;
|
||||||
|
if (tDecodeI32(&decoder, &pRsp->dnodeNum) < 0) return -1;
|
||||||
if (tDecodeI8(&decoder, &pRsp->superUser) < 0) return -1;
|
if (tDecodeI8(&decoder, &pRsp->superUser) < 0) return -1;
|
||||||
if (tDecodeI8(&decoder, &pRsp->connType) < 0) return -1;
|
if (tDecodeI8(&decoder, &pRsp->connType) < 0) return -1;
|
||||||
if (tDecodeSEpSet(&decoder, &pRsp->epSet) < 0) return -1;
|
if (tDecodeSEpSet(&decoder, &pRsp->epSet) < 0) return -1;
|
||||||
|
|
|
@ -227,6 +227,7 @@ static int32_t mndProcessConnectReq(SNodeMsg *pReq) {
|
||||||
connectRsp.clusterId = pMnode->clusterId;
|
connectRsp.clusterId = pMnode->clusterId;
|
||||||
connectRsp.connId = pConn->id;
|
connectRsp.connId = pConn->id;
|
||||||
connectRsp.connType = connReq.connType;
|
connectRsp.connType = connReq.connType;
|
||||||
|
connectRsp.dnodeNum = mndGetDnodeSize(pMnode);
|
||||||
|
|
||||||
snprintf(connectRsp.sVersion, sizeof(connectRsp.sVersion), "ver:%s\nbuild:%s\ngitinfo:%s", version, buildinfo,
|
snprintf(connectRsp.sVersion, sizeof(connectRsp.sVersion), "ver:%s\nbuild:%s\ngitinfo:%s", version, buildinfo,
|
||||||
gitinfo);
|
gitinfo);
|
||||||
|
|
Loading…
Reference in New Issue