fix TD-1931
This commit is contained in:
parent
d0bef0312c
commit
f605be1018
|
@ -322,6 +322,7 @@ int tsdbLoadDataFromCache(STable *pTable, SSkipListIterator *pIter, TSKEY maxKey
|
||||||
memset(pMergeInfo, 0, sizeof(*pMergeInfo));
|
memset(pMergeInfo, 0, sizeof(*pMergeInfo));
|
||||||
pMergeInfo->keyFirst = INT64_MAX;
|
pMergeInfo->keyFirst = INT64_MAX;
|
||||||
pMergeInfo->keyLast = INT64_MIN;
|
pMergeInfo->keyLast = INT64_MIN;
|
||||||
|
if (pCols) tdResetDataCols(pCols);
|
||||||
|
|
||||||
row = tsdbNextIterRow(pIter);
|
row = tsdbNextIterRow(pIter);
|
||||||
if (row == NULL || dataRowKey(row) > maxKey) {
|
if (row == NULL || dataRowKey(row) > maxKey) {
|
||||||
|
|
|
@ -1495,7 +1495,6 @@ static int tsdbProcessAppendCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
|
||||||
ASSERT(pIdx->len > 0);
|
ASSERT(pIdx->len > 0);
|
||||||
SCompBlock *pCompBlock = blockAtIdx(pHelper, pIdx->numOfBlocks - 1);
|
SCompBlock *pCompBlock = blockAtIdx(pHelper, pIdx->numOfBlocks - 1);
|
||||||
ASSERT(pCompBlock->last && pCompBlock->numOfRows < pCfg->minRowsPerFileBlock);
|
ASSERT(pCompBlock->last && pCompBlock->numOfRows < pCfg->minRowsPerFileBlock);
|
||||||
tdResetDataCols(pDataCols);
|
|
||||||
tsdbLoadDataFromCache(pTable, pCommitIter->pIter, maxKey, defaultRowsInBlock - pCompBlock->numOfRows, pDataCols,
|
tsdbLoadDataFromCache(pTable, pCommitIter->pIter, maxKey, defaultRowsInBlock - pCompBlock->numOfRows, pDataCols,
|
||||||
NULL, 0, pCfg->update, pMergeInfo);
|
NULL, 0, pCfg->update, pMergeInfo);
|
||||||
|
|
||||||
|
@ -1525,7 +1524,6 @@ static int tsdbProcessAppendCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ASSERT(!pHelper->hasOldLastBlock);
|
ASSERT(!pHelper->hasOldLastBlock);
|
||||||
tdResetDataCols(pDataCols);
|
|
||||||
tsdbLoadDataFromCache(pTable, pCommitIter->pIter, maxKey, defaultRowsInBlock, pDataCols, NULL, 0, pCfg->update, pMergeInfo);
|
tsdbLoadDataFromCache(pTable, pCommitIter->pIter, maxKey, defaultRowsInBlock, pDataCols, NULL, 0, pCfg->update, pMergeInfo);
|
||||||
ASSERT(pMergeInfo->rowsInserted == pMergeInfo->nOperations && pMergeInfo->nOperations == pDataCols->numOfRows);
|
ASSERT(pMergeInfo->rowsInserted == pMergeInfo->nOperations && pMergeInfo->nOperations == pDataCols->numOfRows);
|
||||||
|
|
||||||
|
@ -1571,7 +1569,6 @@ static int tsdbProcessMergeCommit(SRWHelper *pHelper, SCommitIter *pCommitIter,
|
||||||
|
|
||||||
if ((!TSDB_IS_LAST_BLOCK(&oBlock)) && keyFirst < pCompBlock->keyFirst) {
|
if ((!TSDB_IS_LAST_BLOCK(&oBlock)) && keyFirst < pCompBlock->keyFirst) {
|
||||||
while (true) {
|
while (true) {
|
||||||
tdResetDataCols(pDataCols);
|
|
||||||
tsdbLoadDataFromCache(pTable, pCommitIter->pIter, oBlock.keyFirst-1, defaultRowsInBlock, pDataCols, NULL, 0,
|
tsdbLoadDataFromCache(pTable, pCommitIter->pIter, oBlock.keyFirst-1, defaultRowsInBlock, pDataCols, NULL, 0,
|
||||||
pCfg->update, pMergeInfo);
|
pCfg->update, pMergeInfo);
|
||||||
ASSERT(pMergeInfo->rowsInserted == pMergeInfo->nOperations && pMergeInfo->nOperations == pDataCols->numOfRows);
|
ASSERT(pMergeInfo->rowsInserted == pMergeInfo->nOperations && pMergeInfo->nOperations == pDataCols->numOfRows);
|
||||||
|
|
Loading…
Reference in New Issue