diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index 0cbabb8909814bc15e949f224cab4e21e2427660..d44f8ec74874fa990992fc008671878088d872f0 100644 --- a/src/tsdb/src/tsdbMain.c +++ b/src/tsdb/src/tsdbMain.c @@ -812,6 +812,7 @@ int tsdbRestoreInfo(STsdbRepo *pRepo) { STable *pTable = pMeta->tables[i]; if (pTable == NULL) continue; pTable->restoreColumnNum = 0; + pTable->hasRestoreLastColumn = false; } } @@ -895,6 +896,7 @@ int tsdbCacheLastData(STsdbRepo *pRepo, STsdbCfg* oldCfg) { maxTableIdx = i; if (cacheLastCol) { pTable->restoreColumnNum = 0; + pTable->hasRestoreLastColumn = false; } } @@ -913,6 +915,7 @@ int tsdbCacheLastData(STsdbRepo *pRepo, STsdbCfg* oldCfg) { } if (need_free_last_col) { tsdbFreeLastColumns(pTable); + pTable->hasRestoreLastColumn = false; } } } diff --git a/src/tsdb/src/tsdbMeta.c b/src/tsdb/src/tsdbMeta.c index b4d41dcd086b8b7e80c0988ce561be85e079c937..621be04e216683681f276ff6181a34ffc3613ba4 100644 --- a/src/tsdb/src/tsdbMeta.c +++ b/src/tsdb/src/tsdbMeta.c @@ -609,6 +609,7 @@ void tsdbFreeLastColumns(STable* pTable) { pTable->maxColNum = 0; pTable->lastColSVersion = -1; pTable->restoreColumnNum = 0; + pTable->hasRestoreLastColumn = false; } int16_t tsdbGetLastColumnsIndexByColId(STable* pTable, int16_t colId) { @@ -645,6 +646,7 @@ int tsdbInitColIdCacheWithSchema(STable* pTable, STSchema* pSchema) { pTable->lastColSVersion = schemaVersion(pSchema); pTable->maxColNum = numOfColumn; pTable->restoreColumnNum = 0; + pTable->hasRestoreLastColumn = false; return 0; } @@ -657,7 +659,7 @@ int tsdbUpdateLastColSchema(STable *pTable, STSchema *pNewSchema) { return 0; } - tsdbInfo("tsdbUpdateLastColSchema:%s,%d->%d", pTable->name->data, pTable->lastColSVersion, schemaVersion(pNewSchema)); + tsdbDebug("tsdbUpdateLastColSchema:%s,%d->%d", pTable->name->data, pTable->lastColSVersion, schemaVersion(pNewSchema)); int16_t numOfCols = pNewSchema->numOfCols; SDataCol *lastCols = (SDataCol*)malloc(numOfCols * sizeof(SDataCol)); @@ -802,6 +804,7 @@ static STable *tsdbNewTable() { pTable->lastCols = NULL; pTable->restoreColumnNum = 0; pTable->maxColNum = 0; + pTable->hasRestoreLastColumn = false; pTable->lastColSVersion = -1; return pTable; } diff --git a/src/tsdb/src/tsdbRead.c b/src/tsdb/src/tsdbRead.c index 972c3c4e10c163c4c5b66d3390200b97f207e0a0..4ac900e30ef0418e47c970c6cb9da813b6b83104 100644 --- a/src/tsdb/src/tsdbRead.c +++ b/src/tsdb/src/tsdbRead.c @@ -2520,7 +2520,7 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) { int32_t numOfCols = pTable->maxColNum; if (pTable->lastCols == NULL || pTable->maxColNum <= 0) { - tsdbWarn("no last cached for table, uid:%" PRIu64 ",tid:%d", pTable->tableId.uid, pTable->tableId.tid); + tsdbWarn("no last cached for table %s, uid:%" PRIu64 ",tid:%d", pTable->name->data, pTable->tableId.uid, pTable->tableId.tid); continue; }