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
|
||||
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
|
||||
|
||||
int32_t mndInitDb(SMnode *pMnode) {
|
||||
|
@ -926,6 +925,11 @@ _exit:
|
|||
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) {
|
||||
SMnode *pMnode = pReq->info.node;
|
||||
int32_t code = -1;
|
||||
|
|
|
@ -724,15 +724,18 @@ static bool mndBuildDnodesArrayFp(SMnode *pMnode, void *pObj, void *p1, void *p2
|
|||
}
|
||||
|
||||
if (dnodeList != NULL) {
|
||||
bool inDnodeList = false;
|
||||
for (int32_t index = 0; index < taosArrayGetSize(dnodeList); ++index) {
|
||||
int32_t dnodeId = *(int32_t *)taosArrayGet(dnodeList, index);
|
||||
if (pDnode->id == dnodeId) {
|
||||
inDnodeList = true;
|
||||
int32_t dnodeListSize = taosArrayGetSize(dnodeList);
|
||||
if (dnodeListSize > 0) {
|
||||
bool inDnodeList = false;
|
||||
for (int32_t index = 0; index < dnodeListSize; ++index) {
|
||||
int32_t dnodeId = *(int32_t *)taosArrayGet(dnodeList, index);
|
||||
if (pDnode->id == dnodeId) {
|
||||
inDnodeList = true;
|
||||
}
|
||||
}
|
||||
if (!inDnodeList) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!inDnodeList) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue