From 8925c721e54adedeb446f3a1b5328f822a54630c Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 10 Nov 2023 10:26:45 +0800 Subject: [PATCH] fix(stream): adjust critical section. --- source/dnode/vnode/src/tq/tq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 065690dbfe..3ae0eb1ddf 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -1939,10 +1939,12 @@ int32_t tqProcessTaskUpdateReq(STQ* pTq, SRpcMsg* pMsg) { } else { tqDebug("vgId:%d all %d task(s) nodeEp updated and closed", vgId, numOfTasks); - streamMetaWUnLock(pMeta); #if 1 tqStartStreamTaskAsync(pTq, true); + streamMetaWUnLock(pMeta); #else + streamMetaWUnLock(pMeta); + // For debug purpose. // the following procedure consume many CPU resource, result in the re-election of leader // with high probability. So we employ it as a test case for the stream processing framework, with