未验证 提交 393a9216 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #5292 from taosdata/fix/TD-2008

[TD-2008]<fix>: min(tsHttpMaxThreads) <- 2, default(tsHttpMaxThreads)…
...@@ -1151,7 +1151,7 @@ static void doInitGlobalConfig(void) { ...@@ -1151,7 +1151,7 @@ static void doInitGlobalConfig(void) {
cfg.ptr = &tsHttpMaxThreads; cfg.ptr = &tsHttpMaxThreads;
cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.valType = TAOS_CFG_VTYPE_INT32;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG;
cfg.minValue = 1; cfg.minValue = 2;
cfg.maxValue = 1000000; cfg.maxValue = 1000000;
cfg.ptrLength = 0; cfg.ptrLength = 0;
cfg.unitType = TAOS_CFG_UTYPE_NONE; cfg.unitType = TAOS_CFG_UTYPE_NONE;
...@@ -1523,6 +1523,13 @@ int32_t taosCheckGlobalCfg() { ...@@ -1523,6 +1523,13 @@ int32_t taosCheckGlobalCfg() {
tsNumOfCores = 1; tsNumOfCores = 1;
} }
if (tsHttpMaxThreads == 2) {
int32_t halfNumOfCores = tsNumOfCores >> 1;
if (halfNumOfCores > 2) {
tsHttpMaxThreads = halfNumOfCores;
}
}
if (tsMaxTablePerVnode < tsMinTablePerVnode) { if (tsMaxTablePerVnode < tsMinTablePerVnode) {
uError("maxTablesPerVnode(%d) < minTablesPerVnode(%d), reset to minTablesPerVnode(%d)", uError("maxTablesPerVnode(%d) < minTablesPerVnode(%d), reset to minTablesPerVnode(%d)",
tsMaxTablePerVnode, tsMinTablePerVnode, tsMinTablePerVnode); tsMaxTablePerVnode, tsMinTablePerVnode, tsMinTablePerVnode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册