From b107518b006e429eaac442cf8ea2436877bf1fc6 Mon Sep 17 00:00:00 2001 From: Minghao Li Date: Mon, 5 Dec 2022 20:24:25 +0800 Subject: [PATCH] fix(sync): when FpApplyQueueItems return -1, break loop --- source/libs/sync/src/syncMain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index f9fee9ab90..59e5e968e7 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -1225,7 +1225,7 @@ void syncNodePreClose(SSyncNode* pSyncNode) { while (1) { int32_t aqItems = pSyncNode->pFsm->FpApplyQueueItems(pSyncNode->pFsm); sTrace("vgId:%d, pre close, %d items in apply queue", pSyncNode->vgId, aqItems); - if (aqItems == 0) { + if (aqItems == 0 || aqItems == -1) { break; } taosMsleep(20); -- GitLab