fix: return err while db is creating
This commit is contained in:
parent
aeb46416bb
commit
4385275a89
|
@ -616,13 +616,8 @@ static int32_t mndProcessCreateDbReq(SRpcMsg *pReq) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (terrno == TSDB_CODE_MND_DB_IN_CREATING) {
|
if (terrno == TSDB_CODE_MND_DB_IN_CREATING) {
|
||||||
if (mndSetRpcInfoForDbTrans(pMnode, pReq, MND_OPER_CREATE_DB, createReq.db) == 0) {
|
code = terrno;
|
||||||
mInfo("db:%s, is creating and createdb response after trans finished", createReq.db);
|
goto _OVER;
|
||||||
code = TSDB_CODE_ACTION_IN_PROGRESS;
|
|
||||||
goto _OVER;
|
|
||||||
} else {
|
|
||||||
goto _OVER;
|
|
||||||
}
|
|
||||||
} else if (terrno == TSDB_CODE_MND_DB_IN_DROPPING) {
|
} else if (terrno == TSDB_CODE_MND_DB_IN_DROPPING) {
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
} else if (terrno == TSDB_CODE_MND_DB_NOT_EXIST) {
|
} else if (terrno == TSDB_CODE_MND_DB_NOT_EXIST) {
|
||||||
|
@ -1258,14 +1253,9 @@ static int32_t mndProcessUseDbReq(SRpcMsg *pReq) {
|
||||||
usedbRsp.errCode = terrno;
|
usedbRsp.errCode = terrno;
|
||||||
|
|
||||||
if (terrno == TSDB_CODE_MND_DB_IN_CREATING) {
|
if (terrno == TSDB_CODE_MND_DB_IN_CREATING) {
|
||||||
if (mndSetRpcInfoForDbTrans(pMnode, pReq, MND_OPER_CREATE_DB, usedbReq.db) == 0) {
|
code = terrno;
|
||||||
mInfo("db:%s, is creating and usedb response after trans finished", usedbReq.db);
|
goto _OVER;
|
||||||
code = TSDB_CODE_ACTION_IN_PROGRESS;
|
|
||||||
goto _OVER;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mError("db:%s, failed to process use db req since %s", usedbReq.db, terrstr());
|
|
||||||
} else {
|
} else {
|
||||||
if (mndCheckDbPrivilege(pMnode, pReq->info.conn.user, MND_OPER_USE_DB, pDb) != 0) {
|
if (mndCheckDbPrivilege(pMnode, pReq->info.conn.user, MND_OPER_USE_DB, pDb) != 0) {
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
|
|
Loading…
Reference in New Issue