From 67cf254dde75eadedc38cf58f5bf5c20190069d7 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 30 Jun 2020 14:27:56 +0800 Subject: [PATCH] fix maxTable limitation --- src/tsdb/src/tsdbMain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index 6c6b313073..2ccc962081 100644 --- a/src/tsdb/src/tsdbMain.c +++ b/src/tsdb/src/tsdbMain.c @@ -415,11 +415,11 @@ static int32_t tsdbCheckAndSetDefaultCfg(STsdbCfg *pCfg) { // Check maxTables if (pCfg->maxTables == -1) { - pCfg->maxTables = TSDB_DEFAULT_TABLES; + pCfg->maxTables = TSDB_DEFAULT_TABLES+1; } else { - if (pCfg->maxTables < TSDB_MIN_TABLES || pCfg->maxTables > TSDB_MAX_TABLES) { + if (pCfg->maxTables - 1 < TSDB_MIN_TABLES || pCfg->maxTables - 1 > TSDB_MAX_TABLES + 1) { tsdbError("vgId:%d invalid maxTables configuration! maxTables %d TSDB_MIN_TABLES %d TSDB_MAX_TABLES %d", - pCfg->tsdbId, pCfg->maxTables, TSDB_MIN_TABLES, TSDB_MAX_TABLES); + pCfg->tsdbId, pCfg->maxTables - 1, TSDB_MIN_TABLES, TSDB_MAX_TABLES); goto _err; } } -- GitLab