From 6ff241983d3f5aefd04569e28065095e5d7dd892 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 29 Jul 2022 15:29:26 +0800 Subject: [PATCH] refactor: remove unused config --- include/common/tglobal.h | 1 - source/common/src/tglobal.c | 16 ++++++---------- tests/script/tsim/alter/dnode.sim | 6 ++++++ 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/common/tglobal.h b/include/common/tglobal.h index c07f422557..57d1199e17 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -89,7 +89,6 @@ extern uint16_t tsTelemPort; // query buffer management extern int32_t tsQueryBufferSize; // maximum allowed usage buffer size in MB for each data node during query processing extern int64_t tsQueryBufferSizeBytes; // maximum allowed usage buffer size in byte for each data node -extern bool tsRetrieveBlockingModel; // retrieve threads will be blocked // query client extern int32_t tsQueryPolicy; diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index ce09b83fae..0cc4e31aed 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -124,9 +124,6 @@ int32_t tsMinIntervalTime = 1; int32_t tsQueryBufferSize = -1; int64_t tsQueryBufferSizeBytes = -1; -// in retrieve blocking model, the retrieve threads will wait for the completion of the query processing. -bool tsRetrieveBlockingModel = false; - // tsdb config // For backward compatibility bool tsdbForceKeepFile = false; @@ -296,6 +293,7 @@ static int32_t taosAddServerLogCfg(SConfig *pCfg) { if (cfgAddInt32(pCfg, "smaDebugFlag", smaDebugFlag, 0, 255, 0) != 0) return -1; if (cfgAddInt32(pCfg, "idxDebugFlag", idxDebugFlag, 0, 255, 0) != 0) return -1; if (cfgAddInt32(pCfg, "tdbDebugFlag", tdbDebugFlag, 0, 255, 0) != 0) return -1; + if (cfgAddInt32(pCfg, "metaDebugFlag", metaDebugFlag, 0, 255, 0) != 0) return -1; return 0; } @@ -362,7 +360,6 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { if (cfgAddInt32(pCfg, "maxNumOfDistinctRes", tsMaxNumOfDistinctResults, 10 * 10000, 10000 * 10000, 0) != 0) return -1; if (cfgAddInt32(pCfg, "countAlwaysReturnValue", tsCountAlwaysReturnValue, 0, 1, 0) != 0) return -1; if (cfgAddInt32(pCfg, "queryBufferSize", tsQueryBufferSize, -1, 500000000000, 0) != 0) return -1; - if (cfgAddBool(pCfg, "retrieveBlockingModel", tsRetrieveBlockingModel, 0) != 0) return -1; if (cfgAddBool(pCfg, "printAuth", tsPrintAuth, 0) != 0) return -1; if (cfgAddInt32(pCfg, "multiProcess", tsMultiProcess, 0, 2, 0) != 0) return -1; @@ -476,6 +473,7 @@ static void taosSetServerLogCfg(SConfig *pCfg) { smaDebugFlag = cfgGetItem(pCfg, "smaDebugFlag")->i32; idxDebugFlag = cfgGetItem(pCfg, "idxDebugFlag")->i32; tdbDebugFlag = cfgGetItem(pCfg, "tdbDebugFlag")->i32; + metaDebugFlag = cfgGetItem(pCfg, "metaDebugFlag")->i32; } static int32_t taosSetClientCfg(SConfig *pCfg) { @@ -547,7 +545,6 @@ static int32_t taosSetServerCfg(SConfig *pCfg) { tsMaxNumOfDistinctResults = cfgGetItem(pCfg, "maxNumOfDistinctRes")->i32; tsCountAlwaysReturnValue = cfgGetItem(pCfg, "countAlwaysReturnValue")->i32; tsQueryBufferSize = cfgGetItem(pCfg, "queryBufferSize")->i32; - tsRetrieveBlockingModel = cfgGetItem(pCfg, "retrieveBlockingModel")->bval; tsPrintAuth = cfgGetItem(pCfg, "printAuth")->bval; tsMultiProcess = cfgGetItem(pCfg, "multiProcess")->bval; @@ -832,9 +829,7 @@ int32_t taosSetCfg(SConfig *pCfg, char *name) { break; } case 'r': { - if (strcasecmp("retrieveBlockingModel", name) == 0) { - tsRetrieveBlockingModel = cfgGetItem(pCfg, "retrieveBlockingModel")->bval; - } else if (strcasecmp("rpcQueueMemoryAllowed", name) == 0) { + if (strcasecmp("rpcQueueMemoryAllowed", name) == 0) { tsRpcQueueMemoryAllowed = cfgGetItem(pCfg, "rpcQueueMemoryAllowed")->i64; } else if (strcasecmp("rpcDebugFlag", name) == 0) { rpcDebugFlag = cfgGetItem(pCfg, "rpcDebugFlag")->i32; @@ -1100,12 +1095,12 @@ void taosCfgDynamicOptions(const char *option, const char *value) { const char *options[] = { "dDebugFlag", "vDebugFlag", "mDebugFlag", "wDebugFlag", "sDebugFlag", "tsdbDebugFlag", "tqDebugFlag", "fsDebugFlag", "udfDebugFlag", "smaDebugFlag", "idxDebugFlag", "tdbDebugFlag", - "tmrDebugFlag", "uDebugFlag", "smaDebugFlag", "rpcDebugFlag", "qDebugFlag", + "tmrDebugFlag", "uDebugFlag", "smaDebugFlag", "rpcDebugFlag", "qDebugFlag", "metaDebugFlag", }; int32_t *optionVars[] = { &dDebugFlag, &vDebugFlag, &mDebugFlag, &wDebugFlag, &sDebugFlag, &tsdbDebugFlag, &tqDebugFlag, &fsDebugFlag, &udfDebugFlag, &smaDebugFlag, &idxDebugFlag, &tdbDebugFlag, - &tmrDebugFlag, &uDebugFlag, &smaDebugFlag, &rpcDebugFlag, &qDebugFlag, + &tmrDebugFlag, &uDebugFlag, &smaDebugFlag, &rpcDebugFlag, &qDebugFlag, &metaDebugFlag, }; int32_t optionSize = tListLen(options); @@ -1152,5 +1147,6 @@ void taosSetAllDebugFlag(int32_t flag) { taosSetDebugFlag(&smaDebugFlag, "smaDebugFlag", flag); taosSetDebugFlag(&idxDebugFlag, "idxDebugFlag", flag); taosSetDebugFlag(&tdbDebugFlag, "tdbDebugFlag", flag); + taosSetDebugFlag(&metaDebugFlag, "metaDebugFlag", flag); uInfo("all debug flag are set to %d", flag); } diff --git a/tests/script/tsim/alter/dnode.sim b/tests/script/tsim/alter/dnode.sim index 35620f17aa..d773c1f8a9 100644 --- a/tests/script/tsim/alter/dnode.sim +++ b/tests/script/tsim/alter/dnode.sim @@ -24,14 +24,20 @@ sql alter dnode 1 'fsDebugFlag 131' sql alter dnode 1 'udfDebugFlag 131' sql alter dnode 1 'smaDebugFlag 131' sql alter dnode 1 'idxDebugFlag 131' +sql alter dnode 1 'tdbDebugFlag 131' sql alter dnode 1 'tmrDebugFlag 131' sql alter dnode 1 'uDebugFlag 131' sql alter dnode 1 'smaDebugFlag 131' sql alter dnode 1 'rpcDebugFlag 131' sql alter dnode 1 'qDebugFlag 131' +sql alter dnode 1 'metaDebugFlag 131' sql_error alter dnode 2 'wDebugFlag 135' sql_error alter dnode 2 'tmrDebugFlag 135' +sql_error alter dnode 1 'monDebugFlag 131' +sql_error alter dnode 1 'cqDebugFlag 131' +sql_error alter dnode 1 'httpDebugFlag 131' +sql_error alter dnode 1 'mqttDebugFlag 131' print ======== step3 sql_error alter $hostname1 debugFlag 135 -- GitLab