提交 2029befa 编写于 作者: S Shengliang Guan

repeated creation of the same supertable may deadlock

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