fix: create db errors
This commit is contained in:
parent
aec6f3a105
commit
5bab977a43
|
@ -57,7 +57,6 @@ static int32_t mndProcessGetDbCfgReq(SRpcMsg *pReq);
|
||||||
|
|
||||||
#ifndef TD_ENTERPRISE
|
#ifndef TD_ENTERPRISE
|
||||||
int32_t mndProcessCompactDbReq(SRpcMsg *pReq) { return TSDB_CODE_OPS_NOT_SUPPORT; }
|
int32_t mndProcessCompactDbReq(SRpcMsg *pReq) { return TSDB_CODE_OPS_NOT_SUPPORT; }
|
||||||
int32_t mndCheckDbDnodeList(SMnode *pMnode, char *db, char *dnodeListStr, SArray *dnodeList) { return 0; }
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int32_t mndInitDb(SMnode *pMnode) {
|
int32_t mndInitDb(SMnode *pMnode) {
|
||||||
|
@ -926,6 +925,11 @@ _exit:
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t mndCheckDbDnodeList(SMnode *pMnode, char *db, char *dnodeListStr, SArray *dnodeList) {
|
||||||
|
terrno = TSDB_CODE_OPS_NOT_SUPPORT;
|
||||||
|
return terrno;
|
||||||
|
}
|
||||||
|
|
||||||
static int32_t mndProcessCreateDbReq(SRpcMsg *pReq) {
|
static int32_t mndProcessCreateDbReq(SRpcMsg *pReq) {
|
||||||
SMnode *pMnode = pReq->info.node;
|
SMnode *pMnode = pReq->info.node;
|
||||||
int32_t code = -1;
|
int32_t code = -1;
|
||||||
|
|
|
@ -724,8 +724,10 @@ static bool mndBuildDnodesArrayFp(SMnode *pMnode, void *pObj, void *p1, void *p2
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dnodeList != NULL) {
|
if (dnodeList != NULL) {
|
||||||
|
int32_t dnodeListSize = taosArrayGetSize(dnodeList);
|
||||||
|
if (dnodeListSize > 0) {
|
||||||
bool inDnodeList = false;
|
bool inDnodeList = false;
|
||||||
for (int32_t index = 0; index < taosArrayGetSize(dnodeList); ++index) {
|
for (int32_t index = 0; index < dnodeListSize; ++index) {
|
||||||
int32_t dnodeId = *(int32_t *)taosArrayGet(dnodeList, index);
|
int32_t dnodeId = *(int32_t *)taosArrayGet(dnodeList, index);
|
||||||
if (pDnode->id == dnodeId) {
|
if (pDnode->id == dnodeId) {
|
||||||
inDnodeList = true;
|
inDnodeList = true;
|
||||||
|
@ -735,6 +737,7 @@ static bool mndBuildDnodesArrayFp(SMnode *pMnode, void *pObj, void *p1, void *p2
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int64_t curMs = taosGetTimestampMs();
|
int64_t curMs = taosGetTimestampMs();
|
||||||
bool online = mndIsDnodeOnline(pDnode, curMs);
|
bool online = mndIsDnodeOnline(pDnode, curMs);
|
||||||
|
|
Loading…
Reference in New Issue