From dc1d5c09331e76b276e00d7359204ba8516930be Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Mon, 21 Feb 2022 15:34:23 +0800 Subject: [PATCH] [TS-1220](tsdb): TSZ config num can not add --- src/common/src/tglobal.c | 5 +++-- src/util/inc/tconfig.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index af92f264df..922ae1dedc 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -1812,9 +1812,10 @@ static void doInitGlobalConfig(void) { cfg.ptrLength = 0; cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); - assert(tsGlobalConfigNum < TSDB_CFG_MAX_NUM); + assert(tsGlobalConfigNum == TSDB_CFG_MAX_NUM); #else - assert(tsGlobalConfigNum < TSDB_CFG_MAX_NUM); + // if TD_TSZ macro define, have 5 count configs, so must add 5 + assert(tsGlobalConfigNum + 5 == TSDB_CFG_MAX_NUM); #endif } diff --git a/src/util/inc/tconfig.h b/src/util/inc/tconfig.h index 752930ed7e..c0a4986936 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 132 +#define TSDB_CFG_MAX_NUM 133 #define TSDB_CFG_PRINT_LEN 23 #define TSDB_CFG_OPTION_LEN 24 #define TSDB_CFG_VALUE_LEN 41 -- GitLab