From b8b9dd1c471ea2c8a39bb5540c52613fe5b95851 Mon Sep 17 00:00:00 2001 From: Shungang Li Date: Thu, 25 Jul 2024 15:34:12 +0800 Subject: [PATCH] fix: alter cfg return error --- source/common/src/tglobal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index c2a6067f57..8a44819022 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -1578,7 +1578,7 @@ static int32_t taosCfgDynamicOptionsForServer(SConfig *pCfg, const char *name) { {"experimental", &tsExperimental}, {"maxTsmaNum", &tsMaxTsmaNum}}; - if (TSDB_CODE_SUCCESS != taosCfgSetOption(debugOptions, tListLen(debugOptions), pItem, true)) { + if ((code = taosCfgSetOption(debugOptions, tListLen(debugOptions), pItem, true)) != TSDB_CODE_SUCCESS) { code = taosCfgSetOption(options, tListLen(options), pItem, false); } } @@ -1834,7 +1834,7 @@ static int32_t taosCfgDynamicOptionsForClient(SConfig *pCfg, const char *name) { {"maxTsmaCalcDelay", &tsMaxTsmaCalcDelay}, {"tsmaDataDeleteMark", &tsmaDataDeleteMark}}; - if (TSDB_CODE_SUCCESS != taosCfgSetOption(debugOptions, tListLen(debugOptions), pItem, true)) { + if ((code = taosCfgSetOption(debugOptions, tListLen(debugOptions), pItem, true)) != TSDB_CODE_SUCCESS) { code = taosCfgSetOption(options, tListLen(options), pItem, false); } }