fix(stream): release task before returning.

This commit is contained in:
Haojun Liao 2024-10-31 14:49:16 +08:00
parent 871dd71040
commit b1ad121bae
1 changed files with 5 additions and 0 deletions

View File

@ -200,6 +200,8 @@ int32_t tqStreamTaskProcessUpdateReq(SStreamMeta* pMeta, SMsgCb* cb, SRpcMsg* pM
bool update = streamMetaInitUpdateTaskList(pMeta, req.transId);
if (!update) {
rsp.code = TSDB_CODE_SUCCESS;
streamMetaReleaseTask(pMeta, pTask);
streamMetaWUnLock(pMeta);
taosArrayDestroy(req.pNodeList);
@ -214,7 +216,10 @@ int32_t tqStreamTaskProcessUpdateReq(SStreamMeta* pMeta, SMsgCb* cb, SRpcMsg* pM
tqDebug("s-task:%s (vgId:%d) already update in transId:%d, discard the nodeEp update msg", idstr, vgId,
req.transId);
rsp.code = TSDB_CODE_SUCCESS;
streamMetaReleaseTask(pMeta, pTask);
streamMetaWUnLock(pMeta);
taosArrayDestroy(req.pNodeList);
return rsp.code;
}