repeated creation of the same supertable may deadlock
This commit is contained in:
parent
3a995e3dd5
commit
2029befaa6
|
@ -581,12 +581,11 @@ static int32_t mndProcessMCreateStbReq(SMnodeMsg *pReq) {
|
||||||
}
|
}
|
||||||
|
|
||||||
code = mndCreateStb(pMnode, pReq, &createReq, pDb);
|
code = mndCreateStb(pMnode, pReq, &createReq, pDb);
|
||||||
|
if (code == 0) code = TSDB_CODE_MND_ACTION_IN_PROGRESS;
|
||||||
|
|
||||||
CREATE_STB_OVER:
|
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());
|
mError("stb:%s, failed to create since %s", createReq.name, terrstr());
|
||||||
} else {
|
|
||||||
code = TSDB_CODE_MND_ACTION_IN_PROGRESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mndReleaseStb(pMnode, pStb);
|
mndReleaseStb(pMnode, pStb);
|
||||||
|
@ -1039,12 +1038,11 @@ static int32_t mndProcessMAlterStbReq(SMnodeMsg *pReq) {
|
||||||
}
|
}
|
||||||
|
|
||||||
code = mndAlterStb(pMnode, pReq, &alterReq, pDb, pStb);
|
code = mndAlterStb(pMnode, pReq, &alterReq, pDb, pStb);
|
||||||
|
if (code == 0) code = TSDB_CODE_MND_ACTION_IN_PROGRESS;
|
||||||
|
|
||||||
ALTER_STB_OVER:
|
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());
|
mError("stb:%s, failed to alter since %s", alterReq.name, terrstr());
|
||||||
} else {
|
|
||||||
code = TSDB_CODE_MND_ACTION_IN_PROGRESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mndReleaseStb(pMnode, pStb);
|
mndReleaseStb(pMnode, pStb);
|
||||||
|
|
Loading…
Reference in New Issue