fix: dynamic cfg resetlog
This commit is contained in:
parent
667a8013b7
commit
4906243115
|
@ -1432,6 +1432,13 @@ static int32_t taosCfgSetOption(OptionNameAndVar *pOptions, int32_t optionSize,
|
||||||
static int32_t taosCfgDynamicOptionsForServer(SConfig *pCfg, char *name) {
|
static int32_t taosCfgDynamicOptionsForServer(SConfig *pCfg, char *name) {
|
||||||
terrno = TSDB_CODE_SUCCESS;
|
terrno = TSDB_CODE_SUCCESS;
|
||||||
|
|
||||||
|
if (strcasecmp(name, "resetlog") == 0) {
|
||||||
|
// trigger, no item in cfg
|
||||||
|
taosResetLog();
|
||||||
|
cfgDumpCfg(tsCfg, 0, false);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
SConfigItem *pItem = cfgGetItem(pCfg, name);
|
SConfigItem *pItem = cfgGetItem(pCfg, name);
|
||||||
if (!pItem || (pItem->dynScope & CFG_DYN_SERVER) == 0) {
|
if (!pItem || (pItem->dynScope & CFG_DYN_SERVER) == 0) {
|
||||||
uError("failed to config:%s, not support", name);
|
uError("failed to config:%s, not support", name);
|
||||||
|
@ -1445,12 +1452,6 @@ static int32_t taosCfgDynamicOptionsForServer(SConfig *pCfg, char *name) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(name, "resetlog") == 0) {
|
|
||||||
taosResetLog();
|
|
||||||
cfgDumpCfg(tsCfg, 0, false);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
{ // 'bool/int32_t/int64_t/float/double' variables with general modification function
|
{ // 'bool/int32_t/int64_t/float/double' variables with general modification function
|
||||||
static OptionNameAndVar debugOptions[] = {
|
static OptionNameAndVar debugOptions[] = {
|
||||||
{"dDebugFlag", &dDebugFlag}, {"vDebugFlag", &vDebugFlag}, {"mDebugFlag", &mDebugFlag},
|
{"dDebugFlag", &dDebugFlag}, {"vDebugFlag", &vDebugFlag}, {"mDebugFlag", &mDebugFlag},
|
||||||
|
|
Loading…
Reference in New Issue