Merge pull request #25395 from taosdata/fix/limitIdxMaxThread3

limit index bg thread
This commit is contained in:
Hongze Cheng 2024-06-12 10:27:33 +08:00 committed by GitHub
commit 206280e529
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -26,6 +26,8 @@
#include "tsched.h"
#define INDEX_NUM_OF_THREADS 5
#define INDEX_MAX_NUM_OF_THREADS 10
#define INDEX_QUEUE_SIZE 200
#define INDEX_DATA_BOOL_NULL 0x02
@ -61,6 +63,7 @@ static void indexDestroy(void* sIdx);
void indexInit(int32_t threadNum) {
indexThreads = threadNum;
if (indexThreads <= 1) indexThreads = INDEX_NUM_OF_THREADS;
if (indexThreads >= INDEX_MAX_NUM_OF_THREADS) indexThreads = INDEX_MAX_NUM_OF_THREADS;
}
void indexEnvInit() {
// refactor later