fix: make tdbDebugFlag work
This commit is contained in:
parent
3c460faae7
commit
7974d672b4
|
@ -63,6 +63,7 @@ extern int32_t metaDebugFlag;
|
||||||
extern int32_t udfDebugFlag;
|
extern int32_t udfDebugFlag;
|
||||||
extern int32_t smaDebugFlag;
|
extern int32_t smaDebugFlag;
|
||||||
extern int32_t idxDebugFlag;
|
extern int32_t idxDebugFlag;
|
||||||
|
extern int32_t tdbDebugFlag;
|
||||||
|
|
||||||
int32_t taosInitLog(const char *logName, int32_t maxFiles);
|
int32_t taosInitLog(const char *logName, int32_t maxFiles);
|
||||||
void taosCloseLog();
|
void taosCloseLog();
|
||||||
|
|
|
@ -316,6 +316,7 @@ static int32_t taosAddServerLogCfg(SConfig *pCfg) {
|
||||||
if (cfgAddInt32(pCfg, "udfDebugFlag", udfDebugFlag, 0, 255, 0) != 0) return -1;
|
if (cfgAddInt32(pCfg, "udfDebugFlag", udfDebugFlag, 0, 255, 0) != 0) return -1;
|
||||||
if (cfgAddInt32(pCfg, "smaDebugFlag", smaDebugFlag, 0, 255, 0) != 0) return -1;
|
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, "idxDebugFlag", idxDebugFlag, 0, 255, 0) != 0) return -1;
|
||||||
|
if (cfgAddInt32(pCfg, "tdbDebugFlag", tdbDebugFlag, 0, 255, 0) != 0) return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,6 +507,7 @@ static void taosSetServerLogCfg(SConfig *pCfg) {
|
||||||
udfDebugFlag = cfgGetItem(pCfg, "udfDebugFlag")->i32;
|
udfDebugFlag = cfgGetItem(pCfg, "udfDebugFlag")->i32;
|
||||||
smaDebugFlag = cfgGetItem(pCfg, "smaDebugFlag")->i32;
|
smaDebugFlag = cfgGetItem(pCfg, "smaDebugFlag")->i32;
|
||||||
idxDebugFlag = cfgGetItem(pCfg, "idxDebugFlag")->i32;
|
idxDebugFlag = cfgGetItem(pCfg, "idxDebugFlag")->i32;
|
||||||
|
tdbDebugFlag = cfgGetItem(pCfg, "tdbDebugFlag")->i32;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t taosSetClientCfg(SConfig *pCfg) {
|
static int32_t taosSetClientCfg(SConfig *pCfg) {
|
||||||
|
@ -950,6 +952,8 @@ int32_t taosSetCfg(SConfig *pCfg, char *name) {
|
||||||
uError("failed to create tempDir:%s since %s", tsTempDir, terrstr());
|
uError("failed to create tempDir:%s since %s", tsTempDir, terrstr());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
} else if (strcasecmp("tdbDebugFlag", name) == 0) {
|
||||||
|
tdbDebugFlag = cfgGetItem(pCfg, "tdbDebugFlag")->i32;
|
||||||
} else if (strcasecmp("telemetryReporting", name) == 0) {
|
} else if (strcasecmp("telemetryReporting", name) == 0) {
|
||||||
tsEnableTelem = cfgGetItem(pCfg, "telemetryReporting")->bval;
|
tsEnableTelem = cfgGetItem(pCfg, "telemetryReporting")->bval;
|
||||||
} else if (strcasecmp("telemetryInterval", name) == 0) {
|
} else if (strcasecmp("telemetryInterval", name) == 0) {
|
||||||
|
@ -1151,14 +1155,14 @@ void taosCfgDynamicOptions(const char *option, const char *value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *options[] = {
|
const char *options[] = {
|
||||||
"dDebugFlag", "vDebugFlag", "mDebugFlag", "wDebugFlag", "sDebugFlag", "tsdbDebugFlag",
|
"dDebugFlag", "vDebugFlag", "mDebugFlag", "wDebugFlag", "sDebugFlag", "tsdbDebugFlag",
|
||||||
"tqDebugFlag", "fsDebugFlag", "udfDebugFlag", "smaDebugFlag", "idxDebugFlag", "tmrDebugFlag",
|
"tqDebugFlag", "fsDebugFlag", "udfDebugFlag", "smaDebugFlag", "idxDebugFlag", "tdbDebugFlag",
|
||||||
"uDebugFlag", "smaDebugFlag", "rpcDebugFlag", "qDebugFlag",
|
"tmrDebugFlag", "uDebugFlag", "smaDebugFlag", "rpcDebugFlag", "qDebugFlag",
|
||||||
};
|
};
|
||||||
int32_t *optionVars[] = {
|
int32_t *optionVars[] = {
|
||||||
&dDebugFlag, &vDebugFlag, &mDebugFlag, &wDebugFlag, &sDebugFlag, &tsdbDebugFlag,
|
&dDebugFlag, &vDebugFlag, &mDebugFlag, &wDebugFlag, &sDebugFlag, &tsdbDebugFlag,
|
||||||
&tqDebugFlag, &fsDebugFlag, &udfDebugFlag, &smaDebugFlag, &idxDebugFlag, &tmrDebugFlag,
|
&tqDebugFlag, &fsDebugFlag, &udfDebugFlag, &smaDebugFlag, &idxDebugFlag, &tdbDebugFlag,
|
||||||
&uDebugFlag, &smaDebugFlag, &rpcDebugFlag, &qDebugFlag,
|
&tmrDebugFlag, &uDebugFlag, &smaDebugFlag, &rpcDebugFlag, &qDebugFlag,
|
||||||
};
|
};
|
||||||
|
|
||||||
int32_t optionSize = tListLen(options);
|
int32_t optionSize = tListLen(options);
|
||||||
|
@ -1204,5 +1208,6 @@ void taosSetAllDebugFlag(int32_t flag) {
|
||||||
taosSetDebugFlag(&udfDebugFlag, "udfDebugFlag", flag);
|
taosSetDebugFlag(&udfDebugFlag, "udfDebugFlag", flag);
|
||||||
taosSetDebugFlag(&smaDebugFlag, "smaDebugFlag", flag);
|
taosSetDebugFlag(&smaDebugFlag, "smaDebugFlag", flag);
|
||||||
taosSetDebugFlag(&idxDebugFlag, "idxDebugFlag", flag);
|
taosSetDebugFlag(&idxDebugFlag, "idxDebugFlag", flag);
|
||||||
|
taosSetDebugFlag(&tdbDebugFlag, "tdbDebugFlag", flag);
|
||||||
uInfo("all debug flag are set to %d", flag);
|
uInfo("all debug flag are set to %d", flag);
|
||||||
}
|
}
|
||||||
|
|
|
@ -788,9 +788,9 @@ _OVER:
|
||||||
static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) {
|
static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) {
|
||||||
SMnode *pMnode = pReq->info.node;
|
SMnode *pMnode = pReq->info.node;
|
||||||
const char *options[] = {
|
const char *options[] = {
|
||||||
"debugFlag", "dDebugFlag", "vDebugFlag", "mDebugFlag", "wDebugFlag", "sDebugFlag",
|
"debugFlag", "dDebugFlag", "vDebugFlag", "mDebugFlag", "wDebugFlag", "sDebugFlag",
|
||||||
"tsdbDebugFlag", "tqDebugFlag", "fsDebugFlag", "udfDebugFlag", "smaDebugFlag", "idxDebugFlag",
|
"tsdbDebugFlag", "tqDebugFlag", "fsDebugFlag", "udfDebugFlag", "smaDebugFlag", "idxDebugFlag",
|
||||||
"tmrDebugFlag", "uDebugFlag", "smaDebugFlag", "rpcDebugFlag", "qDebugFlag",
|
"tdbDebugFlag", "tmrDebugFlag", "uDebugFlag", "smaDebugFlag", "rpcDebugFlag", "qDebugFlag",
|
||||||
};
|
};
|
||||||
int32_t optionSize = tListLen(options);
|
int32_t optionSize = tListLen(options);
|
||||||
|
|
||||||
|
@ -813,7 +813,6 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) {
|
||||||
SEpSet epSet = mndGetDnodeEpset(pDnode);
|
SEpSet epSet = mndGetDnodeEpset(pDnode);
|
||||||
mndReleaseDnode(pMnode, pDnode);
|
mndReleaseDnode(pMnode, pDnode);
|
||||||
|
|
||||||
|
|
||||||
SDCfgDnodeReq dcfgReq = {0};
|
SDCfgDnodeReq dcfgReq = {0};
|
||||||
if (strcasecmp(cfgReq.config, "resetlog") == 0) {
|
if (strcasecmp(cfgReq.config, "resetlog") == 0) {
|
||||||
strcpy(dcfgReq.config, "resetlog");
|
strcpy(dcfgReq.config, "resetlog");
|
||||||
|
@ -839,7 +838,7 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) {
|
||||||
if (strncasecmp(cfgReq.config, optName, optLen) != 0) continue;
|
if (strncasecmp(cfgReq.config, optName, optLen) != 0) continue;
|
||||||
|
|
||||||
const char *value = cfgReq.value;
|
const char *value = cfgReq.value;
|
||||||
int32_t flag = atoi(value);
|
int32_t flag = atoi(value);
|
||||||
if (flag <= 0) {
|
if (flag <= 0) {
|
||||||
flag = atoi(cfgReq.config + optLen + 1);
|
flag = atoi(cfgReq.config + optLen + 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue