提交 4385275a 编写于 作者: dengyihao's avatar dengyihao

fix: return err while db is creating

上级 aeb46416
...@@ -616,13 +616,8 @@ static int32_t mndProcessCreateDbReq(SRpcMsg *pReq) { ...@@ -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) { ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册