Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/16332 )
Change subject: KUDU-1587 part 1: load meter for ThreadPool ...................................................................... Patch Set 3: (9 comments) Thanks for the heads up. I'd already started reviewing, so I'm posting what I had. http://gerrit.cloudera.org:8080/#/c/16332/2/src/kudu/util/threadpool.h File src/kudu/util/threadpool.h: http://gerrit.cloudera.org:8080/#/c/16332/2/src/kudu/util/threadpool.h@75 PS2, Line 75: queue_time_history_length nit: typo http://gerrit.cloudera.org:8080/#/c/16332/2/src/kudu/util/threadpool.h@79 PS2, Line 79: set_queue_time_history_length Where is this defined? http://gerrit.cloudera.org:8080/#/c/16332/2/src/kudu/util/threadpool.h@99 PS2, Line 99: // the information on the next task's submit time is specified : // via the 'queue_head_submit_time' parameter. nit: can you also mention that it is OK for queue_head_submit_time to be uninitialized, e.g. if there are no tasks left in the queue http://gerrit.cloudera.org:8080/#/c/16332/2/src/kudu/util/threadpool.h@108 PS2, Line 108: overloaded nit: unfinished sentence? http://gerrit.cloudera.org:8080/#/c/16332/2/src/kudu/util/threadpool.cc File src/kudu/util/threadpool.cc: http://gerrit.cloudera.org:8080/#/c/16332/2/src/kudu/util/threadpool.cc@70 PS2, Line 70: return true; nit: update these to be actual messages http://gerrit.cloudera.org:8080/#/c/16332/2/src/kudu/util/threadpool.cc@132 PS2, Line 132: } : : voi Why don't we want to call this if 'queue_head_submit_time' is uninitialized? Isn't that how we determine that there is nothing in the queue? http://gerrit.cloudera.org:8080/#/c/16332/2/src/kudu/util/threadpool.cc@138 PS2, Line 138: has_idle_thr nit: also suffix this and TaskDequeued() with Unlocked? http://gerrit.cloudera.org:8080/#/c/16332/2/src/kudu/util/threadpool.cc@710 PS2, Line 710: nit: annotate with /*has_idle_threads*/ http://gerrit.cloudera.org:8080/#/c/16332/2/src/kudu/util/threadpool.cc@756 PS2, Line 756: // but for tokens of the SERIAL execution mode, the token isn't in the : // queue_, but will be put there after executing current task. : if (!queue_.empty() && !queue_.front()->entries_.empty()) { : head_token = queue_.front(); : } else if (!token->entries_.empty()) { : head_token = token; : } : const MonoTime now(MonoTime::Now()); : const MonoDelta queue_time = now - task.submit_time; : if (metrics_.load_meter) { : Can we move this into the if(load_meter) block? -- To view, visit http://gerrit.cloudera.org:8080/16332 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I640716dc32f193e68361ca623ee7b9271e661d8b Gerrit-Change-Number: 16332 Gerrit-PatchSet: 3 Gerrit-Owner: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-Comment-Date: Fri, 14 Aug 2020 19:36:14 +0000 Gerrit-HasComments: Yes