From b22679c9418c1733c01eb036cf28bad05edbebe8 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 11 Jun 2024 17:13:44 +0800 Subject: [PATCH] fix(stream): do NOT remove the stream if the stream object is not accessiable, since the deploy trans may not completed yet. --- source/dnode/mnode/impl/src/mndStream.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 7b00978a62..136839451f 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -1115,30 +1115,18 @@ static int32_t mndCheckTaskAndNodeStatus(SMnode *pMnode) { continue; } - // for stopped stream task entry, we do additional check for it if (pEntry->status == TASK_STATUS__STOP) { - bool invalid = false; for(int32_t j = 0; j < taosArrayGetSize(pInvalidList); ++j) { STaskId* pId = taosArrayGet(pInvalidList, j); if (pEntry->id.streamId == pId->streamId) { taosArrayPush(pInvalidList, &pEntry->id); - invalid = true; break; } } - - if (!invalid) { - SStreamObj *pObj = mndGetStreamObj(pMnode, pEntry->id.streamId); - if (pObj == NULL) { - taosArrayPush(pInvalidList, &pEntry->id); - } else { - mndReleaseStream(pMnode, pObj); - } - } } if (pEntry->status != TASK_STATUS__READY) { - mDebug("s-task:0x%" PRIx64 "-0x%x (nodeId:%d) status:%s not ready, checkpoint msg not issued", + mDebug("s-task:0x%" PRIx64 "-0x%x (nodeId:%d) status:%s, checkpoint not issued", pEntry->id.streamId, (int32_t)pEntry->id.taskId, pEntry->nodeId, streamTaskGetStatusStr(pEntry->status)); ready = false; }