fix(tsdb/cache): init isLast once for each fileset
This commit is contained in:
parent
cb93ac2613
commit
0bf98096c9
|
@ -636,6 +636,7 @@ static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow, bool *pIgnoreEa
|
||||||
for (int i = 0; i < state->pLoadInfo->numOfStt; ++i) {
|
for (int i = 0; i < state->pLoadInfo->numOfStt; ++i) {
|
||||||
state->pLoadInfo[i].colIds = aCols;
|
state->pLoadInfo[i].colIds = aCols;
|
||||||
state->pLoadInfo[i].numOfCols = nCols;
|
state->pLoadInfo[i].numOfCols = nCols;
|
||||||
|
state->pLoadInfo[i].isLast = isLast;
|
||||||
}
|
}
|
||||||
tMergeTreeOpen(&state->mergeTree, 1, *state->pDataFReader, state->suid, state->uid,
|
tMergeTreeOpen(&state->mergeTree, 1, *state->pDataFReader, state->suid, state->uid,
|
||||||
&(STimeWindow){.skey = state->lastTs, .ekey = TSKEY_MAX},
|
&(STimeWindow){.skey = state->lastTs, .ekey = TSKEY_MAX},
|
||||||
|
@ -647,10 +648,9 @@ static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow, bool *pIgnoreEa
|
||||||
if (nCols != state->pLoadInfo->numOfCols) {
|
if (nCols != state->pLoadInfo->numOfCols) {
|
||||||
for (int i = 0; i < state->pLoadInfo->numOfStt; ++i) {
|
for (int i = 0; i < state->pLoadInfo->numOfStt; ++i) {
|
||||||
state->pLoadInfo[i].numOfCols = nCols;
|
state->pLoadInfo[i].numOfCols = nCols;
|
||||||
}
|
|
||||||
|
|
||||||
state->pLoadInfo->checkRemainingRow = state->checkRemainingRow;
|
state->pLoadInfo[i].checkRemainingRow = state->checkRemainingRow;
|
||||||
state->pLoadInfo->isLast = isLast;
|
}
|
||||||
}
|
}
|
||||||
bool hasVal = tMergeTreeNext(&state->mergeTree);
|
bool hasVal = tMergeTreeNext(&state->mergeTree);
|
||||||
if (!hasVal) {
|
if (!hasVal) {
|
||||||
|
|
Loading…
Reference in New Issue