morningman commented on a change in pull request #4597: URL: https://github.com/apache/incubator-doris/pull/4597#discussion_r487679091
########## 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: OK ---------------------------------------------------------------- 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