fix coredump due to table delete

This commit is contained in:
Hongze Cheng 2020-05-15 08:23:26 +00:00
parent d3eaaab308
commit d69c99d1e3
1 changed files with 1 additions and 0 deletions

View File

@ -169,6 +169,7 @@ static int tsdbRestoreInfo(STsdbRepo *pRepo) {
if (tsdbSetAndOpenHelperFile(&rhelper, pFGroup) < 0) goto _err; if (tsdbSetAndOpenHelperFile(&rhelper, pFGroup) < 0) goto _err;
for (int i = 1; i < pRepo->config.maxTables; i++) { for (int i = 1; i < pRepo->config.maxTables; i++) {
STable * pTable = pMeta->tables[i]; STable * pTable = pMeta->tables[i];
if (pTable == NULL) continue;
SCompIdx *pIdx = &rhelper.pCompIdx[i]; SCompIdx *pIdx = &rhelper.pCompIdx[i];
if (pIdx->offset > 0 && pTable->lastKey < pIdx->maxKey) pTable->lastKey = pIdx->maxKey; if (pIdx->offset > 0 && pTable->lastKey < pIdx->maxKey) pTable->lastKey = pIdx->maxKey;