Yuqi Du has posted comments on this change. ( http://gerrit.cloudera.org:8080/18447 )
Change subject: [threadpool] KUDU-3364 Add TimerThread for thread pool ...................................................................... Patch Set 26: (4 comments) Thanks your crs. I am sorry lossing the jira message, I reply it now. http://gerrit.cloudera.org:8080/#/c/18447/26//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/18447/26//COMMIT_MSG@9 PS26, Line 9: TimerThread > Should this be updated to 'SchedulerThread'? Sorry, I forgot to change it and now it's hard to change because it has been committed to the repository http://gerrit.cloudera.org:8080/#/c/18447/26/src/kudu/util/threadpool.h File src/kudu/util/threadpool.h: http://gerrit.cloudera.org:8080/#/c/18447/26/src/kudu/util/threadpool.h@474 PS26, Line 474: WaitForScheduler > Is this only for tests? Now, it's used by tests. But it can be used by module codes if needed. http://gerrit.cloudera.org:8080/#/c/18447/26/src/kudu/util/threadpool.cc File src/kudu/util/threadpool.cc: http://gerrit.cloudera.org:8080/#/c/18447/26/src/kudu/util/threadpool.cc@60 PS26, Line 60: 100 > Why the default interval is 100ms, maybe add a comment to explain the reaso It is used when enable_scheduler_ is true. SchedulerThread's schedule_period_ms_ should be setted at construct function, so the variable is configurable. Comments can add later. http://gerrit.cloudera.org:8080/#/c/18447/26/src/kudu/util/threadpool.cc@250 PS26, Line 250: delay_ms > What if `delay_ms` is less than or equal to `schedule_period_ms_`? Will the schedule_period_ms_ is a time precise. If delay_ms <= schedule_period_ms_, the task will be scheduled at next schedule. Because of the time precise, the wait time is not a expected time, the wait time is a value in [0, schedule_period_ms_) -- To view, visit http://gerrit.cloudera.org:8080/18447 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If51fce48ae6a45a0bf3314f8a102ee373c5c442e Gerrit-Change-Number: 18447 Gerrit-PatchSet: 26 Gerrit-Owner: Yuqi Du <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Khazar Mammadli <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Reviewer: Yuqi Du <[email protected]> Gerrit-Comment-Date: Wed, 01 Jun 2022 03:13:32 +0000 Gerrit-HasComments: Yes
