提交 745bb662 编写于 作者: Y yifan hao

Only increment wWorkerPool.nextId when wWorkerPool.nextId is launched

Only increment wWorkerPool.nextId when wWorkerPool.nextId is launched
上级 577962ed
......@@ -132,8 +132,6 @@ void *dnodeAllocateWqueue(void *pVnode) {
taosCloseQueue(queue);
return NULL;
}
wWorkerPool.nextId = (wWorkerPool.nextId + 1) % wWorkerPool.max;
pthread_attr_t thAttr;
pthread_attr_init(&thAttr);
pthread_attr_setdetachstate(&thAttr, PTHREAD_CREATE_JOINABLE);
......@@ -146,6 +144,7 @@ void *dnodeAllocateWqueue(void *pVnode) {
queue = NULL;
} else {
dTrace("write worker:%d is launched", pWorker->workerId);
wWorkerPool.nextId = (wWorkerPool.nextId + 1) % wWorkerPool.max;
}
pthread_attr_destroy(&thAttr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册