From 872a24eb1e8e4767b340cd079e89d84952e60154 Mon Sep 17 00:00:00 2001 From: xiao-77 Date: Tue, 7 Jan 2025 23:47:36 +0800 Subject: [PATCH] Fix valgrind errors. --- source/libs/sync/src/syncPipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index 5a5d1f02f8..3022a1f8ac 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -787,6 +787,7 @@ int32_t syncLogBufferCommit(SSyncLogBuffer* pBuf, SSyncNode* pNode, int64_t comm bool inBuf = false; SSyncRaftEntry* pNextEntry = NULL; bool nextInBuf = false; + bool restoreFinishAtThisCommit = false; if (commitIndex <= pBuf->commitIndex) { sDebug("vgId:%d, stale commit index. current:%" PRId64 ", notified:%" PRId64 "", vgId, pBuf->commitIndex, @@ -901,7 +902,6 @@ int32_t syncLogBufferCommit(SSyncLogBuffer* pBuf, SSyncNode* pNode, int64_t comm } while (true); code = 0; - bool restoreFinishAtThisCommit = false; _out: // mark as restored if needed if (!pNode->restoreFinish && pBuf->commitIndex >= pNode->commitIndex && pEntry != NULL &&