diff --git a/.gitmodules b/.gitmodules index 9efd31c9480f785cd30a7106905e5bf75bea15b1..bdaa5508b214e81f67a79b56fce5e0e2e865308e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,7 @@ [submodule "deps/TSZ"] path = deps/TSZ url = https://github.com/taosdata/TSZ.git + branch = master [submodule "src/kit/taos-tools"] path = src/kit/taos-tools url = https://github.com/taosdata/taos-tools diff --git a/cmake/input.inc b/cmake/input.inc index bc79de48a482539660e6166b642144d754fc94a4..9d411e382b4a9b07de238cc1caaa246dcbda57bc 100755 --- a/cmake/input.inc +++ b/cmake/input.inc @@ -96,11 +96,12 @@ IF (${VERBOSE} MATCHES "true") SET(TD_BUILD_VERBOSE TRUE) ENDIF () -IF (${TSZ_ENABLED} MATCHES "true") - # define add +# build TSZ by default +IF ("${TSZ_ENABLED}" MATCHES "false") + set(VAR_TSZ "" CACHE INTERNAL "global variant empty" ) +ELSE() + # define add MESSAGE(STATUS "build with TSZ enabled") ADD_DEFINITIONS(-DTD_TSZ) set(VAR_TSZ "TSZ" CACHE INTERNAL "global variant tsz" ) -ELSE() - set(VAR_TSZ "" CACHE INTERNAL "global variant empty" ) -ENDIF() +ENDIF() \ No newline at end of file diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index a8b4fd288ea83676c98fa9db5acc464b42f51992..d4526a8839dc41d91fd717d542c543b806db5fce 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -45,6 +45,6 @@ IF (TD_LINUX_64 AND JEMALLOC_ENABLED) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/build/include) ENDIF () -IF (${TSZ_ENABLED} MATCHES "true") +IF (NOT "${TSZ_ENABLED}" MATCHES "false") ADD_SUBDIRECTORY(TSZ) ENDIF() diff --git a/deps/TSZ b/deps/TSZ new file mode 160000 index 0000000000000000000000000000000000000000..11c1060d4f917dd799ae628b131db5d6a5ef6954 --- /dev/null +++ b/deps/TSZ @@ -0,0 +1 @@ +Subproject commit 11c1060d4f917dd799ae628b131db5d6a5ef6954 diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index ab4f5fa4f4344799e8cc0d0cc1f0a6be1b3328bc..a63fb76529fe485d0f072cb6e81cce165bcf1eb6 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -1800,9 +1800,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/kit/taospack/taospack.c b/src/kit/taospack/taospack.c index 9e7355b42af8fe296975f78960639de0a43a4d18..13360606df240966ec7cde494bbd07772f64be26 100644 --- a/src/kit/taospack/taospack.c +++ b/src/kit/taospack/taospack.c @@ -704,7 +704,7 @@ void leakFloat() { void leakTest(){ - for(int i=0; i< 90000000000000; i++){ + for(int i=0; i< 90000000; i++){ if(i%10000==0) printf(" ---------- %d ---------------- \n", i); leakFloat(); diff --git a/src/util/inc/tconfig.h b/src/util/inc/tconfig.h index fd9a340a25a752b18ab07a8fbb2691038af3b71b..c0a4986936f7d43d48aa4fac0be6f427f5db32f5 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 131 +#define TSDB_CFG_MAX_NUM 133 #define TSDB_CFG_PRINT_LEN 23 #define TSDB_CFG_OPTION_LEN 24 #define TSDB_CFG_VALUE_LEN 41