diff --git a/src/vnode/tsdb/inc/tsdbFile.h b/src/vnode/tsdb/inc/tsdbFile.h index 2f38f1f45236061a9f1459c713f40a9bb1eaee38..89159a06e71af6c95c546c0b149c657026ff5c2e 100644 --- a/src/vnode/tsdb/inc/tsdbFile.h +++ b/src/vnode/tsdb/inc/tsdbFile.h @@ -55,6 +55,7 @@ typedef struct { int32_t keep; int32_t minRowPerFBlock; int32_t maxRowsPerFBlock; + int32_t maxTables; SFileGroup fGroup[]; } STsdbFileH; diff --git a/src/vnode/tsdb/src/tsdbFile.c b/src/vnode/tsdb/src/tsdbFile.c index cce5dade4b71fddf5078c79bbe686fbc22b6b7b5..8a7e40cabd0d7e864c9190009cd4a52deaf436cd 100644 --- a/src/vnode/tsdb/src/tsdbFile.c +++ b/src/vnode/tsdb/src/tsdbFile.c @@ -197,6 +197,7 @@ STsdbFileH *tsdbInitFile(char *dataDir, int32_t daysPerFile, int32_t keep, int32 pTsdbFileH->keep = keep; pTsdbFileH->minRowPerFBlock = minRowsPerFBlock; pTsdbFileH->maxRowsPerFBlock = maxRowsPerFBlock; + pTsdbFileH->maxTables = maxTables; // Open the directory to read information of each file DIR *dir = opendir(dataDir); @@ -205,8 +206,9 @@ STsdbFileH *tsdbInitFile(char *dataDir, int32_t daysPerFile, int32_t keep, int32 return NULL; } + char fname[256]; + struct dirent *dp; - char fname[256]; while ((dp = readdir(dir)) != NULL) { if (strncmp(dp->d_name, ".", 1) == 0 || strncmp(dp->d_name, "..", 2) == 0) continue; if (true /* check if the file is the .head file */) {