From 8620e889651c117d667866edf3a7e031b0e3a349 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 18 Jan 2024 14:17:08 +0800 Subject: [PATCH] fix(stream): enable wait for timer for meta quit safely. --- source/libs/stream/src/streamMeta.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index 6e35e39a0a..4a1fa40091 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -1269,11 +1269,11 @@ void streamMetaNotifyClose(SStreamMeta* pMeta) { // wait for the stream meta hb function stopping if (pMeta->role == NODE_ROLE_LEADER) { -// pMeta->pHbInfo->stopFlag = STREAM_META_WILL_STOP; -// while (pMeta->pHbInfo->stopFlag != STREAM_META_OK_TO_STOP) { -// taosMsleep(100); -// stDebug("vgId:%d wait for meta to stop timer", pMeta->vgId); -// } + pMeta->pHbInfo->stopFlag = STREAM_META_WILL_STOP; + while (pMeta->pHbInfo->stopFlag != STREAM_META_OK_TO_STOP) { + taosMsleep(100); + stDebug("vgId:%d wait for meta to stop timer", pMeta->vgId); + } } stDebug("vgId:%d start to check all tasks", vgId);