fix: commit during add sub block

This commit is contained in:
Cary Xu 2022-05-10 13:44:21 +08:00
parent 22cb29e9b8
commit ba2783919b
1 changed files with 4 additions and 2 deletions

View File

@ -248,11 +248,13 @@ int tsdbLoadDataFromCache(STable *pTable, SSkipListIterator *pIter, TSKEY maxKey
pMergeInfo->nOperations++;
pMergeInfo->keyFirst = TMIN(pMergeInfo->keyFirst, rowKey);
pMergeInfo->keyLast = TMAX(pMergeInfo->keyLast, rowKey);
lastKey = rowKey;
if (pCols) {
++pCols->numOfRows;
if (lastKey != TSKEY_INITIAL_VAL) {
++pCols->numOfRows;
}
tsdbAppendTableRowToCols(pTable, pCols, &pSchema, row, false);
}
lastKey = rowKey;
} else {
tsdbAppendTableRowToCols(pTable, pCols, &pSchema, row, true);
}