Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/18674 )
Change subject: [threadpool] Fix scheduler thread a coredump bug ...................................................................... Patch Set 34: (6 comments) http://gerrit.cloudera.org:8080/#/c/18674/34/src/kudu/util/threadpool-test.cc File src/kudu/util/threadpool-test.cc: http://gerrit.cloudera.org:8080/#/c/18674/34/src/kudu/util/threadpool-test.cc@193 PS34, Line 193: ASSERT_OK(token->Schedule(&IssueTraceStatement, 200)); : token->Shutdown(); : SleepFor(MonoDelta::FromMilliseconds(500)); What does it want to provide? Seems not related to the test name, i.e. ThreadPoolTest.TestSubmitAfterShutdown ? Suggest to add a new test. http://gerrit.cloudera.org:8080/#/c/18674/34/src/kudu/util/threadpool-test.cc@198 PS34, Line 198: nit: remove it http://gerrit.cloudera.org:8080/#/c/18674/34/src/kudu/util/threadpool.h File src/kudu/util/threadpool.h: http://gerrit.cloudera.org:8080/#/c/18674/34/src/kudu/util/threadpool.h@200 PS34, Line 200: tasks_ nit: future_tasks_ ? http://gerrit.cloudera.org:8080/#/c/18674/34/src/kudu/util/threadpool.h@203 PS34, Line 203: Future tasks, which timepoint <= now timepoint, will execute. how about some like: Tasks by their earliest execute time. Tasks will executed in time range [execute_time, execute_time + schedule_period_ms_). http://gerrit.cloudera.org:8080/#/c/18674/34/src/kudu/util/threadpool.cc File src/kudu/util/threadpool.cc: http://gerrit.cloudera.org:8080/#/c/18674/34/src/kudu/util/threadpool.cc@154 PS34, Line 154: while (token != nullptr) { IMO, token is possible to be a wild pointer, isn't it? http://gerrit.cloudera.org:8080/#/c/18674/34/src/kudu/util/threadpool.cc@168 PS34, Line 168: generally it's a bug, do not use ThreadPoolToken::Schedule(...) I'm not sure what does it mean, could you please explain more about it? -- To view, visit http://gerrit.cloudera.org:8080/18674 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie5bc5511a745f3dc12dfe1a6a1813ece41ccc2a8 Gerrit-Change-Number: 18674 Gerrit-PatchSet: 34 Gerrit-Owner: Yuqi Du <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Reviewer: Yuqi Du <[email protected]> Gerrit-Comment-Date: Tue, 19 Jul 2022 17:25:48 +0000 Gerrit-HasComments: Yes
