Merge remote-tracking branch 'haoyifan/fix2' into develop
This commit is contained in:
commit
20e7786123
|
@ -84,7 +84,7 @@ static void dnodeAllocModules() {
|
|||
}
|
||||
|
||||
void dnodeCleanupModules() {
|
||||
for (int32_t module = 1; module < TSDB_MOD_MAX; ++module) {
|
||||
for (EModuleType module = 1; module < TSDB_MOD_MAX; ++module) {
|
||||
if (tsModule[module].enable && tsModule[module].stopFp) {
|
||||
(*tsModule[module].stopFp)();
|
||||
}
|
||||
|
|
|
@ -136,17 +136,24 @@ void *dnodeAllocateVnodeWqueue(void *pVnode) {
|
|||
|
||||
taosAddIntoQset(pWorker->qset, queue, pVnode);
|
||||
pWorker->qall = taosAllocateQall();
|
||||
wWorkerPool.nextId = (wWorkerPool.nextId + 1) % wWorkerPool.max;
|
||||
|
||||
if (pWorker->qall == NULL) {
|
||||
taosCloseQset(pWorker->qset);
|
||||
taosCloseQueue(queue);
|
||||
return NULL;
|
||||
}
|
||||
pthread_attr_t thAttr;
|
||||
pthread_attr_init(&thAttr);
|
||||
pthread_attr_setdetachstate(&thAttr, PTHREAD_CREATE_JOINABLE);
|
||||
|
||||
if (pthread_create(&pWorker->thread, &thAttr, dnodeProcessWriteQueue, pWorker) != 0) {
|
||||
dError("failed to create thread to process read queue, reason:%s", strerror(errno));
|
||||
taosFreeQall(pWorker->qall);
|
||||
taosCloseQset(pWorker->qset);
|
||||
taosCloseQueue(queue);
|
||||
queue = NULL;
|
||||
} else {
|
||||
dTrace("write worker:%d is launched", pWorker->workerId);
|
||||
wWorkerPool.nextId = (wWorkerPool.nextId + 1) % wWorkerPool.max;
|
||||
}
|
||||
|
||||
pthread_attr_destroy(&thAttr);
|
||||
|
|
Loading…
Reference in New Issue