未验证 提交 8ef1f24a 编写于 作者: S slguan 提交者: GitHub

Merge pull request #1662 from taosdata/hotfix/usleep

change the polling timer to 30ms for both read and write queue
...@@ -225,7 +225,7 @@ static void dnodeHandleIdleReadWorker(SReadWorker *pWorker) { ...@@ -225,7 +225,7 @@ static void dnodeHandleIdleReadWorker(SReadWorker *pWorker) {
dTrace("read worker:%d is released, total:%d", pWorker->workerId, readPool.num); dTrace("read worker:%d is released, total:%d", pWorker->workerId, readPool.num);
pthread_exit(NULL); pthread_exit(NULL);
} else { } else {
usleep(100); usleep(30000);
sched_yield(); sched_yield();
} }
} }
......
...@@ -227,7 +227,7 @@ static void dnodeHandleIdleWorker(SWriteWorker *pWorker) { ...@@ -227,7 +227,7 @@ static void dnodeHandleIdleWorker(SWriteWorker *pWorker) {
int32_t num = taosGetQueueNumber(pWorker->qset); int32_t num = taosGetQueueNumber(pWorker->qset);
if (num > 0) { if (num > 0) {
usleep(1000); usleep(30000);
sched_yield(); sched_yield();
} else { } else {
taosFreeQall(pWorker->qall); taosFreeQall(pWorker->qall);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册