diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index e97f3a7338d0122b3b1aae6243d8a867f638de37..8ab24bdde2a2cc7063f0c70efe56ede811fc139d 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -1581,7 +1581,6 @@ static void doInitGlobalConfig(void) { cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); - assert(tsGlobalConfigNum <= TSDB_CFG_MAX_NUM); #ifdef TD_TSZ // lossy compress cfg.option = "lossyColumns"; @@ -1602,8 +1601,6 @@ static void doInitGlobalConfig(void) { cfg.maxValue = MAX_FLOAT; cfg.ptrLength = 0; cfg.unitType = TAOS_CFG_UTYPE_NONE; - - taosInitConfigOption(cfg); cfg.option = "dPrecision"; @@ -1635,6 +1632,9 @@ static void doInitGlobalConfig(void) { cfg.ptrLength = 0; cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); + assert(tsGlobalConfigNum == TSDB_CFG_MAX_NUM); +#else + assert(tsGlobalConfigNum == TSDB_CFG_MAX_NUM - 5); #endif } diff --git a/src/util/inc/tconfig.h b/src/util/inc/tconfig.h index f146ec0b8b675527b41dfb2267946193e5e5fe89..5bd69aece2ffa2166c268b437549c95a30608383 100644 --- a/src/util/inc/tconfig.h +++ b/src/util/inc/tconfig.h @@ -20,7 +20,7 @@ extern "C" { #endif -#define TSDB_CFG_MAX_NUM 116 // 110 + 6 with lossy option +#define TSDB_CFG_MAX_NUM 119 #define TSDB_CFG_PRINT_LEN 23 #define TSDB_CFG_OPTION_LEN 24 #define TSDB_CFG_VALUE_LEN 41