repeated creation of the same supertable may deadlock

This commit is contained in:
Shengliang Guan 2022-02-10 17:17:10 +08:00
parent 3a995e3dd5
commit 2029befaa6
1 changed files with 4 additions and 6 deletions

View File

@ -581,12 +581,11 @@ static int32_t mndProcessMCreateStbReq(SMnodeMsg *pReq) {
}
code = mndCreateStb(pMnode, pReq, &createReq, pDb);
if (code == 0) code = TSDB_CODE_MND_ACTION_IN_PROGRESS;
CREATE_STB_OVER:
if (code != 0) {
if (code != 0 && code != TSDB_CODE_MND_ACTION_IN_PROGRESS) {
mError("stb:%s, failed to create since %s", createReq.name, terrstr());
} else {
code = TSDB_CODE_MND_ACTION_IN_PROGRESS;
}
mndReleaseStb(pMnode, pStb);
@ -1039,12 +1038,11 @@ static int32_t mndProcessMAlterStbReq(SMnodeMsg *pReq) {
}
code = mndAlterStb(pMnode, pReq, &alterReq, pDb, pStb);
if (code == 0) code = TSDB_CODE_MND_ACTION_IN_PROGRESS;
ALTER_STB_OVER:
if (code != 0) {
if (code != 0 && code != TSDB_CODE_MND_ACTION_IN_PROGRESS) {
mError("stb:%s, failed to alter since %s", alterReq.name, terrstr());
} else {
code = TSDB_CODE_MND_ACTION_IN_PROGRESS;
}
mndReleaseStb(pMnode, pStb);