Merge pull request #25007 from taosdata/fix/TD-29012
fix: dynmaic config supportvnodes in ent
This commit is contained in:
commit
512892648b
|
@ -586,7 +586,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
|
||||||
|
|
||||||
tsNumOfSupportVnodes = tsNumOfCores * 2;
|
tsNumOfSupportVnodes = tsNumOfCores * 2;
|
||||||
tsNumOfSupportVnodes = TMAX(tsNumOfSupportVnodes, 2);
|
tsNumOfSupportVnodes = TMAX(tsNumOfSupportVnodes, 2);
|
||||||
if (cfgAddInt32(pCfg, "supportVnodes", tsNumOfSupportVnodes, 0, 4096, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1;
|
if (cfgAddInt32(pCfg, "supportVnodes", tsNumOfSupportVnodes, 0, 4096, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0) return -1;
|
||||||
|
|
||||||
if (cfgAddInt32(pCfg, "statusInterval", tsStatusInterval, 1, 30, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1;
|
if (cfgAddInt32(pCfg, "statusInterval", tsStatusInterval, 1, 30, CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0) return -1;
|
||||||
if (cfgAddInt32(pCfg, "minSlidingTime", tsMinSlidingTime, 1, 1000000, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT) != 0)
|
if (cfgAddInt32(pCfg, "minSlidingTime", tsMinSlidingTime, 1, 1000000, CFG_SCOPE_CLIENT, CFG_DYN_CLIENT) != 0)
|
||||||
|
|
|
@ -1409,24 +1409,6 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) {
|
||||||
if (strcasecmp(cfgReq.config, "resetlog") == 0) {
|
if (strcasecmp(cfgReq.config, "resetlog") == 0) {
|
||||||
strcpy(dcfgReq.config, "resetlog");
|
strcpy(dcfgReq.config, "resetlog");
|
||||||
#ifdef TD_ENTERPRISE
|
#ifdef TD_ENTERPRISE
|
||||||
} else if (strncasecmp(cfgReq.config, "supportvnodes", 13) == 0) {
|
|
||||||
int32_t optLen = strlen("supportvnodes");
|
|
||||||
int32_t flag = -1;
|
|
||||||
int32_t code = mndMCfgGetValInt32(&cfgReq, optLen, &flag);
|
|
||||||
if (code < 0) return code;
|
|
||||||
|
|
||||||
if (flag < 0 || flag > 4096) {
|
|
||||||
mError("dnode:%d, failed to config supportVnodes since value:%d. Valid range: [0, 4096]", cfgReq.dnodeId, flag);
|
|
||||||
terrno = TSDB_CODE_OUT_OF_RANGE;
|
|
||||||
goto _err_out;
|
|
||||||
}
|
|
||||||
if (flag == 0) {
|
|
||||||
flag = tsNumOfCores * 2;
|
|
||||||
}
|
|
||||||
flag = TMAX(flag, 2);
|
|
||||||
|
|
||||||
strcpy(dcfgReq.config, "supportvnodes");
|
|
||||||
snprintf(dcfgReq.value, TSDB_DNODE_VALUE_LEN, "%d", flag);
|
|
||||||
} else if (strncasecmp(cfgReq.config, "s3blocksize", 11) == 0) {
|
} else if (strncasecmp(cfgReq.config, "s3blocksize", 11) == 0) {
|
||||||
int32_t optLen = strlen("s3blocksize");
|
int32_t optLen = strlen("s3blocksize");
|
||||||
int32_t flag = -1;
|
int32_t flag = -1;
|
||||||
|
|
Loading…
Reference in New Issue