From 8cb2edb25ca85b835a93db43b0a0a35d058f2009 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Wed, 11 May 2022 07:55:01 +0800 Subject: [PATCH] enh: code optimization --- source/dnode/vnode/src/tsdb/tsdbCommit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCommit.c b/source/dnode/vnode/src/tsdb/tsdbCommit.c index 26b1dc7274..5f54e0cb48 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCommit.c +++ b/source/dnode/vnode/src/tsdb/tsdbCommit.c @@ -883,7 +883,6 @@ static int tsdbMoveBlkIdx(SCommitH *pCommith, SBlockIdx *pIdx) { SReadH *pReadh = &pCommith->readh; int nBlocks = pIdx->numOfBlocks; int bidx = 0; - SBlock *pBlock; tsdbResetCommitTable(pCommith); @@ -895,6 +894,8 @@ static int tsdbMoveBlkIdx(SCommitH *pCommith, SBlockIdx *pIdx) { while (bidx < nBlocks) { if (tsdbMoveBlock(pCommith, bidx) < 0) { + tsdbError("vgId:%d failed to move block into file %s since %s", TSDB_COMMIT_REPO_ID(pCommith), + TSDB_FILE_FULL_NAME(TSDB_COMMIT_HEAD_FILE(pCommith)), tstrerror(terrno)); return -1; } ++bidx; -- GitLab