diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index 324edb422b653cb9c0734a1af8c405df6377c3f6..ac7bc31c3dccd41c14135b9691daacf96e59c157 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -141,6 +141,7 @@ int32_t rpcDebugFlag = 135; int32_t uDebugFlag = 131; int32_t debugFlag = 131; int32_t sDebugFlag = 135; +int32_t tsdbDebugFlag = 135; // the maximum number of results for projection query on super table that are returned from // one virtual node, to order according to timestamp @@ -216,7 +217,8 @@ void taosSetAllDebugFlag() { rpcDebugFlag = debugFlag; uDebugFlag = debugFlag; sDebugFlag = debugFlag; - //qDebugFlag = debugFlag; + tsdbDebugFlag = debugFlag; + qDebugFlag = debugFlag; } uPrint("all debug flag are set to %d", debugFlag); } @@ -1131,6 +1133,16 @@ static void doInitGlobalConfig() { cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); + cfg.option = "tsdbDebugFlag"; + cfg.ptr = &tsdbDebugFlag; + cfg.valType = TAOS_CFG_VTYPE_INT32; + cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG | TSDB_CFG_CTYPE_B_CLIENT; + cfg.minValue = 0; + cfg.maxValue = 255; + cfg.ptrLength = 0; + cfg.unitType = TAOS_CFG_UTYPE_NONE; + taosInitConfigOption(cfg); + cfg.option = "tscEnableRecordSql"; cfg.ptr = &tsTscEnableRecordSql; cfg.valType = TAOS_CFG_VTYPE_INT32; diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index 36cb937d331fcb058596f3b3ebef98cb2f2cd717..cac5279b764a2efb38b721d45c8a92b3df82be46 100644 --- a/src/tsdb/src/tsdbMain.c +++ b/src/tsdb/src/tsdbMain.c @@ -9,8 +9,6 @@ #include "ttime.h" #include -int tsdbDebugFlag = 135; - #define TSDB_DEFAULT_PRECISION TSDB_PRECISION_MILLI // default precision #define IS_VALID_PRECISION(precision) (((precision) >= TSDB_PRECISION_MILLI) && ((precision) <= TSDB_PRECISION_NANO)) #define TSDB_DEFAULT_COMPRESSION TWO_STAGE_COMP