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 817469819700d6529389fca860b76feea3f1d5a4..8d494211943cba895c6af58de54ac1f8ff1a6b42 100644 --- a/src/tsdb/src/tsdbMeta.c +++ b/src/tsdb/src/tsdbMeta.c @@ -607,6 +607,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) { @@ -643,6 +644,7 @@ int tsdbInitColIdCacheWithSchema(STable* pTable, STSchema* pSchema) { pTable->lastColSVersion = schemaVersion(pSchema); pTable->maxColNum = numOfColumn; pTable->restoreColumnNum = 0; + pTable->hasRestoreLastColumn = false; return 0; } @@ -655,7 +657,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)); @@ -800,6 +802,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; }