fix: the modification of alter dnode does not take effect through show dnode variables
This commit is contained in:
parent
d9f6300920
commit
b859e6bde2
|
@ -152,7 +152,8 @@ void taosCfgDynamicOptions(const char *option, const char *value);
|
||||||
void taosAddDataDir(int32_t index, char *v1, int32_t level, int32_t primary);
|
void taosAddDataDir(int32_t index, char *v1, int32_t level, int32_t primary);
|
||||||
|
|
||||||
struct SConfig *taosGetCfg();
|
struct SConfig *taosGetCfg();
|
||||||
int32_t taosSetCfg(SConfig *pCfg, char* name);
|
|
||||||
|
int32_t taosSetCfg(SConfig *pCfg, char *name);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,7 @@ int32_t taosInitLog(const char *logName, int32_t maxFiles);
|
||||||
void taosCloseLog();
|
void taosCloseLog();
|
||||||
void taosResetLog();
|
void taosResetLog();
|
||||||
void taosSetAllDebugFlag(int32_t flag);
|
void taosSetAllDebugFlag(int32_t flag);
|
||||||
|
void taosSetDebugFlag(int32_t *pFlagPtr, const char *flagName, int32_t flagVal);
|
||||||
void taosDumpData(uint8_t *msg, int32_t len);
|
void taosDumpData(uint8_t *msg, int32_t len);
|
||||||
|
|
||||||
void taosPrintLog(const char *flags, ELogLevel level, int32_t dflag, const char *format, ...)
|
void taosPrintLog(const char *flags, ELogLevel level, int32_t dflag, const char *format, ...)
|
||||||
|
|
|
@ -1143,6 +1143,10 @@ void taosCfgDynamicOptions(const char *option, const char *value) {
|
||||||
int32_t monitor = atoi(value);
|
int32_t monitor = atoi(value);
|
||||||
uInfo("monitor set from %d to %d", tsEnableMonitor, monitor);
|
uInfo("monitor set from %d to %d", tsEnableMonitor, monitor);
|
||||||
tsEnableMonitor = monitor;
|
tsEnableMonitor = monitor;
|
||||||
|
SConfigItem *pItem = cfgGetItem(tsCfg, "monitor");
|
||||||
|
if (pItem != NULL) {
|
||||||
|
pItem->bval = tsEnableMonitor;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1166,6 +1170,7 @@ void taosCfgDynamicOptions(const char *option, const char *value) {
|
||||||
int32_t flag = atoi(value);
|
int32_t flag = atoi(value);
|
||||||
uInfo("%s set from %d to %d", optName, *optionVars[d], flag);
|
uInfo("%s set from %d to %d", optName, *optionVars[d], flag);
|
||||||
*optionVars[d] = flag;
|
*optionVars[d] = flag;
|
||||||
|
taosSetDebugFlag(optionVars[d], optName, flag);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -874,7 +874,7 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t mndProcessConfigDnodeRsp(SRpcMsg *pRsp) {
|
static int32_t mndProcessConfigDnodeRsp(SRpcMsg *pRsp) {
|
||||||
mInfo("config rsp from dnode, app:%p", pRsp->info.ahandle);
|
mInfo("config rsp from dnode");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "tlog.h"
|
#include "tlog.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "tutil.h"
|
#include "tutil.h"
|
||||||
|
#include "tconfig.h"
|
||||||
|
|
||||||
#define LOG_MAX_LINE_SIZE (1024)
|
#define LOG_MAX_LINE_SIZE (1024)
|
||||||
#define LOG_MAX_LINE_BUFFER_SIZE (LOG_MAX_LINE_SIZE + 3)
|
#define LOG_MAX_LINE_BUFFER_SIZE (LOG_MAX_LINE_SIZE + 3)
|
||||||
|
@ -62,6 +63,7 @@ typedef struct {
|
||||||
TdThreadMutex logMutex;
|
TdThreadMutex logMutex;
|
||||||
} SLogObj;
|
} SLogObj;
|
||||||
|
|
||||||
|
extern SConfig *tsCfg;
|
||||||
static int8_t tsLogInited = 0;
|
static int8_t tsLogInited = 0;
|
||||||
static SLogObj tsLogObj = {.fileNum = 1};
|
static SLogObj tsLogObj = {.fileNum = 1};
|
||||||
static int64_t tsAsyncLogLostLines = 0;
|
static int64_t tsAsyncLogLostLines = 0;
|
||||||
|
@ -742,24 +744,32 @@ cmp_end:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void taosSetDebugFlag(int32_t *pFlagPtr, const char *flagName, int32_t flagVal) {
|
||||||
|
SConfigItem *pItem = cfgGetItem(tsCfg, flagName);
|
||||||
|
if (pItem != NULL) {
|
||||||
|
pItem->i32 = flagVal;
|
||||||
|
}
|
||||||
|
*pFlagPtr = flagVal;
|
||||||
|
}
|
||||||
|
|
||||||
void taosSetAllDebugFlag(int32_t flag) {
|
void taosSetAllDebugFlag(int32_t flag) {
|
||||||
if (flag <= 0) return;
|
if (flag <= 0) return;
|
||||||
|
|
||||||
uDebugFlag = flag;
|
taosSetDebugFlag(&uDebugFlag, "uDebugFlag", flag);
|
||||||
rpcDebugFlag = flag;
|
taosSetDebugFlag(&rpcDebugFlag, "rpcDebugFlag", flag);
|
||||||
jniDebugFlag = flag;
|
taosSetDebugFlag(&jniDebugFlag, "jniDebugFlag", flag);
|
||||||
qDebugFlag = flag;
|
taosSetDebugFlag(&qDebugFlag, "qDebugFlag", flag);
|
||||||
cDebugFlag = flag;
|
taosSetDebugFlag(&cDebugFlag, "cDebugFlag", flag);
|
||||||
dDebugFlag = flag;
|
taosSetDebugFlag(&dDebugFlag, "dDebugFlag", flag);
|
||||||
vDebugFlag = flag;
|
taosSetDebugFlag(&vDebugFlag, "vDebugFlag", flag);
|
||||||
mDebugFlag = flag;
|
taosSetDebugFlag(&mDebugFlag, "mDebugFlag", flag);
|
||||||
wDebugFlag = flag;
|
taosSetDebugFlag(&wDebugFlag, "wDebugFlag", flag);
|
||||||
sDebugFlag = flag;
|
taosSetDebugFlag(&sDebugFlag, "sDebugFlag", flag);
|
||||||
tsdbDebugFlag = flag;
|
taosSetDebugFlag(&tsdbDebugFlag, "tsdbDebugFlag", flag);
|
||||||
tqDebugFlag = flag;
|
taosSetDebugFlag(&tqDebugFlag, "tqDebugFlag", flag);
|
||||||
fsDebugFlag = flag;
|
taosSetDebugFlag(&fsDebugFlag, "fsDebugFlag", flag);
|
||||||
udfDebugFlag = flag;
|
taosSetDebugFlag(&udfDebugFlag, "udfDebugFlag", flag);
|
||||||
smaDebugFlag = flag;
|
taosSetDebugFlag(&smaDebugFlag, "smaDebugFlag", flag);
|
||||||
idxDebugFlag = flag;
|
taosSetDebugFlag(&idxDebugFlag, "idxDebugFlag", flag);
|
||||||
uInfo("all debug flag are set to %d", flag);
|
uInfo("all debug flag are set to %d", flag);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue