fix: wrong thread num

This commit is contained in:
Shengliang Guan 2022-07-05 18:44:00 +08:00
parent 080c03048b
commit 9aa870e5fe
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ static int32_t vmOpenVnodes(SVnodeMgmt *pMgmt) {
pMgmt->state.totalVnodes = numOfVnodes; pMgmt->state.totalVnodes = numOfVnodes;
int32_t threadNum = tsNumOfCores / 2; int32_t threadNum = tsNumOfCores / 2;
if (threadNum < 1) threadNum = 0; if (threadNum < 1) threadNum = 1;
int32_t vnodesPerThread = numOfVnodes / threadNum + 1; int32_t vnodesPerThread = numOfVnodes / threadNum + 1;
SVnodeThread *threads = taosMemoryCalloc(threadNum, sizeof(SVnodeThread)); SVnodeThread *threads = taosMemoryCalloc(threadNum, sizeof(SVnodeThread));