From 5416e73203c0aed9c3e82f541bbb26b585549806 Mon Sep 17 00:00:00 2001 From: xiao-77 Date: Thu, 28 Nov 2024 10:22:16 +0800 Subject: [PATCH] Fix some ci errors. --- source/common/src/tglobal.c | 2 +- source/dnode/mnode/impl/src/mndConfig.c | 13 ++++++++----- tests/system-test/0-others/show.py | 2 +- .../system-test/2-query/agg_group_NotReturnValue.py | 2 +- tests/system-test/2-query/countAlwaysReturnValue.py | 2 +- tests/system-test/2-query/db.py | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index b91e8dd0fc..f847f1ac03 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -701,7 +701,7 @@ static int32_t taosAddClientCfg(SConfig *pCfg) { TAOS_CHECK_RETURN(cfgAddBool(pCfg, "multiResultFunctionStarReturnTags", tsMultiResultFunctionStarReturnTags, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT, CFG_CATEGORY_LOCAL)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "countAlwaysReturnValue", tsCountAlwaysReturnValue, 0, 1, CFG_SCOPE_BOTH, - CFG_DYN_CLIENT, CFG_CATEGORY_LOCAL)); + CFG_DYN_BOTH, CFG_CATEGORY_GLOBAL)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "maxTsmaCalcDelay", tsMaxTsmaCalcDelay, 600, 86400, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT, CFG_CATEGORY_LOCAL)); TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "tsmaDataDeleteMark", tsmaDataDeleteMark, 60 * 60 * 1000, INT64_MAX, diff --git a/source/dnode/mnode/impl/src/mndConfig.c b/source/dnode/mnode/impl/src/mndConfig.c index a79485dd7d..b9108776b3 100644 --- a/source/dnode/mnode/impl/src/mndConfig.c +++ b/source/dnode/mnode/impl/src/mndConfig.c @@ -468,6 +468,7 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) { SDCfgDnodeReq dcfgReq = {0}; if (strcasecmp(cfgReq.config, "resetlog") == 0) { (void)strcpy(dcfgReq.config, "resetlog"); + goto _send_req; #ifdef TD_ENTERPRISE } else if (strncasecmp(cfgReq.config, "s3blocksize", 11) == 0) { int32_t optLen = strlen("s3blocksize"); @@ -511,12 +512,14 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) { if (pItem->category == CFG_CATEGORY_GLOBAL) { TAOS_CHECK_GOTO(mndConfigUpdateTrans(pMnode, dcfgReq.config, dcfgReq.value), &lino, _err_out); } - { // audit - char obj[50] = {0}; - (void)sprintf(obj, "%d", cfgReq.dnodeId); +_send_req : - auditRecord(pReq, pMnode->clusterId, "alterDnode", obj, "", cfgReq.sql, cfgReq.sqlLen); - } +{ // audit + char obj[50] = {0}; + (void)sprintf(obj, "%d", cfgReq.dnodeId); + + auditRecord(pReq, pMnode->clusterId, "alterDnode", obj, "", cfgReq.sql, cfgReq.sqlLen); +} tFreeSMCfgDnodeReq(&cfgReq); diff --git a/tests/system-test/0-others/show.py b/tests/system-test/0-others/show.py index 032e5eebe1..e6fa7bf16b 100644 --- a/tests/system-test/0-others/show.py +++ b/tests/system-test/0-others/show.py @@ -288,7 +288,7 @@ class TDTestCase: vals = ['9223372036854775807', '9223372036854775807.1', '9223372036854775806', '9223372036854775808', '9223372036854775808.1', '9223372036854775807.0', '9223372036854775806.1'] expected_vals = ['9223372036854775807', 'err', '9223372036854775806', 'err', 'err', 'err', 'err'] for val_str, expected_val in zip(vals, expected_vals): - sql = f'ALTER dnode 1 "{var}" "{val_str}"' + sql = f'ALTER all dnodes "{var}" "{val_str}"' if expected_val == 'err': tdSql.error(sql) else: diff --git a/tests/system-test/2-query/agg_group_NotReturnValue.py b/tests/system-test/2-query/agg_group_NotReturnValue.py index 059a5c5f2e..2a88812587 100755 --- a/tests/system-test/2-query/agg_group_NotReturnValue.py +++ b/tests/system-test/2-query/agg_group_NotReturnValue.py @@ -1588,7 +1588,7 @@ class TDTestCase(TDTestCase): self.dropandcreateDB_random("nested", 1) self.modify_tables() - tdSql.execute('alter local "countAlwaysReturnValue" "0"') + tdSql.execute('alter all dnodes "countAlwaysReturnValue" "0"') self.tag_count_all() self.tbname_count_all() diff --git a/tests/system-test/2-query/countAlwaysReturnValue.py b/tests/system-test/2-query/countAlwaysReturnValue.py index a6a064ddfd..699eb7c502 100644 --- a/tests/system-test/2-query/countAlwaysReturnValue.py +++ b/tests/system-test/2-query/countAlwaysReturnValue.py @@ -168,7 +168,7 @@ class TDTestCase: tdLog.printNoPrefix("==========step1:prepare data ==============") self.prepare_data() - tdSql.execute('alter local "countAlwaysReturnValue" "0"') + tdSql.execute('alter all dnodes "countAlwaysReturnValue" "0"') tdLog.printNoPrefix("==========step2:test results ==============") diff --git a/tests/system-test/2-query/db.py b/tests/system-test/2-query/db.py index ee6b517061..65eb28f640 100644 --- a/tests/system-test/2-query/db.py +++ b/tests/system-test/2-query/db.py @@ -47,7 +47,7 @@ class TDTestCase: def case2(self): tdSql.query("show variables") - tdSql.checkRows(9) + tdSql.checkRows(95) for i in range(self.replicaVar): tdSql.query("show dnode %d variables like 'debugFlag'" % (i + 1))