enh: code optimization

This commit is contained in:
Cary Xu 2022-05-11 07:55:01 +08:00
parent a8e9154425
commit 8cb2edb25c
1 changed files with 2 additions and 1 deletions

View File

@ -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;