fix(stream): adjust position of checking trans.

This commit is contained in:
Haojun Liao 2025-01-21 19:04:14 +08:00
parent 88a94919c4
commit 2f065062c3
1 changed files with 7 additions and 7 deletions

View File

@ -799,6 +799,13 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) {
TSDB_CHECK_NULL(sql, code, lino, _OVER, terrno);
}
// check for the taskEp update trans
if (isNodeUpdateTransActive()) {
mError("stream:%s failed to create stream, node update trans is active", createReq.name);
code = TSDB_CODE_STREAM_TASK_IVLD_STATUS;
goto _OVER;
}
SDbObj *pSourceDb = mndAcquireDb(pMnode, createReq.sourceDB);
if (pSourceDb == NULL) {
code = terrno;
@ -807,13 +814,6 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) {
goto _OVER;
}
// check for the taskEp update trans
if (isNodeUpdateTransActive()) {
mError("stream:%s failed to create stream, node update trans is active", createReq.name);
code = TSDB_CODE_STREAM_TASK_IVLD_STATUS;
goto _OVER;
}
code = mndCheckForSnode(pMnode, pSourceDb);
mndReleaseDb(pMnode, pSourceDb);
if (code != 0) {