Yuqi Du has posted comments on this change. ( http://gerrit.cloudera.org:8080/18867 )
Change subject: [threadpool] Fix unsafe behaviour when SchedulerThread shutdown ...................................................................... Patch Set 16: Code-Review+1 (7 comments) Thanks your crs, you are very kind. Thank you. http://gerrit.cloudera.org:8080/#/c/18867/15//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/18867/15//COMMIT_MSG@10 PS15, Line 10: set to nullptr > ni: set to Done http://gerrit.cloudera.org:8080/#/c/18867/15//COMMIT_MSG@11 PS15, Line 11: if thr > if thread Done http://gerrit.cloudera.org:8080/#/c/18867/15//COMMIT_MSG@11 PS15, Line 11: en is not shut > is not shutdown Done http://gerrit.cloudera.org:8080/#/c/18867/15//COMMIT_MSG@12 PS15, Line 12: 'scheduler_' is a > scheduler_ is a Done http://gerrit.cloudera.org:8080/#/c/18867/15/src/kudu/util/threadpool-test.cc File src/kudu/util/threadpool-test.cc: http://gerrit.cloudera.org:8080/#/c/18867/15/src/kudu/util/threadpool-test.cc@184 PS15, Line 184: // delay_ms is a random time: 1ms or > How about use class Random to generate random data, the test may run very f ok, have changed. http://gerrit.cloudera.org:8080/#/c/18867/15/src/kudu/util/threadpool-test.cc@204 PS15, Line 204: pool_->Shutdown(); > It it used to ensure the test can be finished safetly, what will happen if Remove it, it will also succeed, but the case is not better than before, because all tasks may be pending. Every 'ContinuousIssueTraceStatement' run ensure submit a new delay task, so the scheduler's queue(std::mutimap) always have some tasks, this will encounter running tasks when 'pool_' shutdown http://gerrit.cloudera.org:8080/#/c/18867/15/src/kudu/util/threadpool.cc File src/kudu/util/threadpool.cc: http://gerrit.cloudera.org:8080/#/c/18867/15/src/kudu/util/threadpool.cc@538 PS15, Line 538: has been sh > nit: has been shutdown? Done -- To view, visit http://gerrit.cloudera.org:8080/18867 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I021422f7e51e1007c5bdbc877ab445f70ba12357 Gerrit-Change-Number: 18867 Gerrit-PatchSet: 16 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: Thu, 22 Sep 2022 14:58:10 +0000 Gerrit-HasComments: Yes
