acelyc111 commented on a change in pull request #4597: URL: https://github.com/apache/incubator-doris/pull/4597#discussion_r487661840
########## File path: be/src/agent/task_worker_pool.cpp ########## @@ -1007,13 +1038,18 @@ void TaskWorkerPool::_report_task_worker_thread_callback() { if (status != DORIS_SUCCESS) { DorisMetrics::instance()->report_task_requests_failed->increment(1); - LOG(WARNING) << "finish report task failed. status:" << status << ", master host:" + LOG(WARNING) << "report task failed. status:" << status << ", master host:" Review comment: ```suggestion LOG(WARNING) << "report task failed. status: " << status << ", master host: " ``` ########## File path: be/src/agent/task_worker_pool.h ########## @@ -43,6 +43,8 @@ class ThreadPool; class TaskWorkerPool { public: + // You need to modify the content in TYPE_STRING at the same time, Review comment: Maybe it's not easy to keep order consistency some days later, how about use a function to get name of type? ########## File path: be/src/olap/storage_engine.cpp ########## @@ -975,11 +975,17 @@ void StorageEngine::deregister_report_listener(TaskWorkerPool* listener) { _report_listeners.erase(listener); } -void StorageEngine::notify_listeners() { +/// if submit_task is true, it will notify the listeners by submmiting a task. +/// otherwise, it just notify the thread +void StorageEngine::notify_listeners(bool submit_task) { std::lock_guard<std::mutex> l(_report_mtx); for (auto& listener : _report_listeners) { - TAgentTaskRequest task; - listener->submit_task(task); + if (submit_task) { + TAgentTaskRequest task; + listener->submit_task(task); Review comment: Seems all callers pass a 'false' parameter, how about remove these code? ########## File path: be/src/agent/task_worker_pool.cpp ########## @@ -1007,13 +1038,18 @@ void TaskWorkerPool::_report_task_worker_thread_callback() { if (status != DORIS_SUCCESS) { DorisMetrics::instance()->report_task_requests_failed->increment(1); - LOG(WARNING) << "finish report task failed. status:" << status << ", master host:" + LOG(WARNING) << "report task failed. status:" << status << ", master host:" Review comment: The same to other places. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org