TD-2067
This commit is contained in:
parent
ab6387cae2
commit
028e62c974
|
@ -44,6 +44,7 @@ extern int32_t tsMaxShellConns;
|
|||
extern int32_t tsShellActivityTimer;
|
||||
extern uint32_t tsMaxTmrCtrl;
|
||||
extern float tsNumOfThreadsPerCore;
|
||||
extern int32_t tsNumOfCommitThreads;
|
||||
extern float tsRatioOfQueryThreads; // todo remove it
|
||||
extern int8_t tsDaylight;
|
||||
extern char tsTimezone[];
|
||||
|
|
|
@ -51,6 +51,7 @@ int32_t tsMaxShellConns = 5000;
|
|||
int32_t tsMaxConnections = 5000;
|
||||
int32_t tsShellActivityTimer = 3; // second
|
||||
float tsNumOfThreadsPerCore = 1.0f;
|
||||
int32_t tsNumOfCommitThreads = 1;
|
||||
float tsRatioOfQueryThreads = 0.5f;
|
||||
int8_t tsDaylight = 0;
|
||||
char tsTimezone[TSDB_TIMEZONE_LEN] = {0};
|
||||
|
@ -426,6 +427,16 @@ static void doInitGlobalConfig(void) {
|
|||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||
taosInitConfigOption(cfg);
|
||||
|
||||
cfg.option = "numOfCommitThreads";
|
||||
cfg.ptr = &tsNumOfCommitThreads;
|
||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG;
|
||||
cfg.minValue = 1;
|
||||
cfg.maxValue = 100;
|
||||
cfg.ptrLength = 0;
|
||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||
taosInitConfigOption(cfg);
|
||||
|
||||
cfg.option = "ratioOfQueryThreads";
|
||||
cfg.ptr = &tsRatioOfQueryThreads;
|
||||
cfg.valType = TAOS_CFG_VTYPE_FLOAT;
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
#include "vnodeCfg.h"
|
||||
#include "vnodeVersion.h"
|
||||
|
||||
#define DEFAULT_COMMIT_THREADS 1
|
||||
|
||||
static SHashObj*tsVnodesHash;
|
||||
static void vnodeCleanUp(SVnodeObj *pVnode);
|
||||
static int vnodeProcessTsdbStatus(void *arg, int status);
|
||||
|
@ -69,7 +67,7 @@ int32_t vnodeInitResources() {
|
|||
return TSDB_CODE_VND_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if (tsdbInitCommitQueue(DEFAULT_COMMIT_THREADS) < 0) {
|
||||
if (tsdbInitCommitQueue(tsNumOfCommitThreads) < 0) {
|
||||
vError("failed to init vnode commit queue");
|
||||
return terrno;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue