From 13b6d3174e06125e1d8580cab0ea9c6257b2aa61 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 1 Nov 2023 10:35:25 +0800 Subject: [PATCH] change NumOfTaskQueueThreads size --- source/common/src/tglobal.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index fc95e9335c..4c3fb065b4 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -486,6 +486,10 @@ static int32_t taosAddClientCfg(SConfig *pCfg) { tsNumOfTaskQueueThreads = tsNumOfCores / 2; tsNumOfTaskQueueThreads = TMAX(tsNumOfTaskQueueThreads, 4); + + if (tsNumOfTaskQueueThreads >= 50) { + tsNumOfTaskQueueThreads = 50; + } if (cfgAddInt32(pCfg, "numOfTaskQueueThreads", tsNumOfTaskQueueThreads, 4, 1024, CFG_SCOPE_CLIENT) != 0) return -1; return 0; @@ -1798,4 +1802,4 @@ void taosSetAllDebugFlag(int32_t flag, bool rewrite) { uInfo("all debug flag are set to %d", flag); } -int8_t taosGranted() { return atomic_load_8(&tsGrant); } +int8_t taosGranted() { return atomic_load_8(&tsGrant); } \ No newline at end of file