From 233777b6ac2e0beb40e80d2e9993e5f03700955d 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 4ac6e59f1e..dd4bee27f0 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -1934,10 +1934,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