fix: change parameter
This commit is contained in:
parent
05e61bac89
commit
ebcbdcfddc
|
@ -211,9 +211,7 @@ int32_t taosSetTfsCfg(SConfig *pCfg) {
|
||||||
int32_t taosSetTfsCfg(SConfig *pCfg);
|
int32_t taosSetTfsCfg(SConfig *pCfg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct SConfig *taosGetCfg() {
|
struct SConfig *taosGetCfg() { return tsCfg; }
|
||||||
return tsCfg;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int32_t taosLoadCfg(SConfig *pCfg, const char **envCmd, const char *inputCfgDir, const char *envFile,
|
static int32_t taosLoadCfg(SConfig *pCfg, const char **envCmd, const char *inputCfgDir, const char *envFile,
|
||||||
char *apolloUrl) {
|
char *apolloUrl) {
|
||||||
|
@ -498,7 +496,7 @@ static int32_t taosUpdateServerCfg(SConfig *pCfg) {
|
||||||
pItem = cfgGetItem(tsCfg, "numOfRpcThreads");
|
pItem = cfgGetItem(tsCfg, "numOfRpcThreads");
|
||||||
if (pItem != NULL && pItem->stype == CFG_STYPE_DEFAULT) {
|
if (pItem != NULL && pItem->stype == CFG_STYPE_DEFAULT) {
|
||||||
tsNumOfRpcThreads = numOfCores / 2;
|
tsNumOfRpcThreads = numOfCores / 2;
|
||||||
tsNumOfRpcThreads = TRANGE(tsNumOfRpcThreads, 1, 4);
|
tsNumOfRpcThreads = TRANGE(tsNumOfRpcThreads, 1, TSDB_MAX_RPC_THREADS);
|
||||||
pItem->i32 = tsNumOfRpcThreads;
|
pItem->i32 = tsNumOfRpcThreads;
|
||||||
pItem->stype = stype;
|
pItem->stype = stype;
|
||||||
}
|
}
|
||||||
|
|
|
@ -284,7 +284,11 @@ int32_t dmInitClient(SDnode *pDnode) {
|
||||||
rpcInit.failFastThreshold = 3; // failed threshold
|
rpcInit.failFastThreshold = 3; // failed threshold
|
||||||
rpcInit.ffp = dmFailFastFp;
|
rpcInit.ffp = dmFailFastFp;
|
||||||
|
|
||||||
rpcInit.connLimitNum = 3000;
|
int32_t connLimitNum = 30000 / (tsNumOfRpcThreads * 3);
|
||||||
|
connLimitNum = TMAX(connLimitNum, 500);
|
||||||
|
connLimitNum = TMIN(connLimitNum, 3000);
|
||||||
|
|
||||||
|
rpcInit.connLimitNum = connLimitNum;
|
||||||
rpcInit.connLimitLock = 1;
|
rpcInit.connLimitLock = 1;
|
||||||
|
|
||||||
pTrans->clientRpc = rpcOpen(&rpcInit);
|
pTrans->clientRpc = rpcOpen(&rpcInit);
|
||||||
|
|
Loading…
Reference in New Issue