提交 46c31a24 编写于 作者: S slguan

[TD-10] remove redundant code from dnode

上级 82a72bf2
...@@ -47,7 +47,6 @@ static pthread_mutex_t tsDnodeMutex; ...@@ -47,7 +47,6 @@ static pthread_mutex_t tsDnodeMutex;
static SDnodeRunStatus tsDnodeRunStatus = TSDB_DNODE_RUN_STATUS_STOPPED; static SDnodeRunStatus tsDnodeRunStatus = TSDB_DNODE_RUN_STATUS_STOPPED;
static int32_t dnodeInitRpcQHandle(); static int32_t dnodeInitRpcQHandle();
static int32_t dnodeInitQueryQHandle();
static int32_t dnodeInitTmrCtl(); static int32_t dnodeInitTmrCtl();
...@@ -57,8 +56,6 @@ int32_t (*dnodeInitPeers)(int32_t numOfThreads) = NULL; ...@@ -57,8 +56,6 @@ int32_t (*dnodeInitPeers)(int32_t numOfThreads) = NULL;
void *tsDnodeTmr; void *tsDnodeTmr;
void **tsRpcQhandle; void **tsRpcQhandle;
void *tsDnodeMgmtQhandle;
void *tsQueryQhandle;
int32_t tsVnodePeers = TSDB_VNODES_SUPPORT - 1; int32_t tsVnodePeers = TSDB_VNODES_SUPPORT - 1;
int32_t tsMaxQueues; int32_t tsMaxQueues;
uint32_t tsRebootTime; uint32_t tsRebootTime;
...@@ -193,11 +190,6 @@ int32_t dnodeInitSystem() { ...@@ -193,11 +190,6 @@ int32_t dnodeInitSystem() {
return -1; return -1;
} }
if (dnodeInitQueryQHandle() < 0) {
dError("failed to init query qhandle, exit");
return -1;
}
if (dnodeInitMgmt() < 0) { if (dnodeInitMgmt() < 0) {
dError("failed to init vnode storage"); dError("failed to init vnode storage");
return -1; return -1;
...@@ -251,20 +243,6 @@ int32_t dnodeInitStorageImp() { ...@@ -251,20 +243,6 @@ int32_t dnodeInitStorageImp() {
return 0; return 0;
} }
static int32_t dnodeInitQueryQHandle() {
int32_t numOfThreads = tsRatioOfQueryThreads * tsNumOfCores * tsNumOfThreadsPerCore;
if (numOfThreads < 1) {
numOfThreads = 1;
}
int32_t maxQueueSize = tsNumOfVnodesPerCore * tsNumOfCores * tsSessionsPerVnode;
dTrace("query task queue initialized, max slot:%d, task threads:%d", maxQueueSize, numOfThreads);
tsQueryQhandle = taosInitSchedulerWithInfo(maxQueueSize, numOfThreads, "query", tsDnodeTmr);
return 0;
}
static int32_t dnodeInitTmrCtl() { static int32_t dnodeInitTmrCtl() {
tsDnodeTmr = taosTmrInit(TSDB_MAX_VNODES * (tsVnodePeers + 10) + tsSessionsPerVnode + 1000, 200, 60000, tsDnodeTmr = taosTmrInit(TSDB_MAX_VNODES * (tsVnodePeers + 10) + tsSessionsPerVnode + 1000, 200, 60000,
"DND-vnode"); "DND-vnode");
...@@ -288,8 +266,6 @@ static int32_t dnodeInitRpcQHandle() { ...@@ -288,8 +266,6 @@ static int32_t dnodeInitRpcQHandle() {
tsRpcQhandle[i] = taosInitScheduler(tsSessionsPerVnode, 1, "dnode"); tsRpcQhandle[i] = taosInitScheduler(tsSessionsPerVnode, 1, "dnode");
} }
tsDnodeMgmtQhandle = taosInitScheduler(tsSessionsPerVnode, 1, "mgmt");
return 0; return 0;
} }
......
...@@ -46,7 +46,6 @@ extern int32_t (*dnodeCheckSystem)(); ...@@ -46,7 +46,6 @@ extern int32_t (*dnodeCheckSystem)();
// dnodeSystem // dnodeSystem
extern void *tsDnodeMgmtQhandle;
void dnodeCheckDataDirOpenned(const char* dir); void dnodeCheckDataDirOpenned(const char* dir);
// dnodeModule // dnodeModule
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册