github-actions[bot] commented on code in PR #18691: URL: https://github.com/apache/doris/pull/18691#discussion_r1167373896
########## be/src/agent/task_worker_pool.cpp: ########## @@ -269,6 +274,11 @@ void TaskWorkerPool::notify_thread() { VLOG_CRITICAL << "notify task worker pool: " << _name; } +void TaskWorkerPool::cancel_batch_task(int64_t batch_id) { + std::shared_lock<std::mutex> cancel_lock(_cancel_lock); Review Comment: warning: no matching constructor for initialization of 'std::shared_lock<std::mutex>' [clang-diagnostic-error] ```cpp std::shared_lock<std::mutex> cancel_lock(_cancel_lock); ^ ``` **/usr/include/c++/11/shared_mutex:724:** candidate constructor not viable: no known conversion from 'std::shared_mutex' to 'std::shared_lock<std::mutex>::mutex_type &' (aka 'std::mutex &') for 1st argument ```cpp shared_lock(mutex_type& __m) ^ ``` **/usr/include/c++/11/shared_mutex:755:** candidate constructor not viable: no known conversion from 'std::shared_mutex' to 'const std::shared_lock<std::mutex>' for 1st argument ```cpp shared_lock(shared_lock const&) = delete; ^ ``` **/usr/include/c++/11/shared_mutex:758:** candidate constructor not viable: no known conversion from 'std::shared_mutex' to 'std::shared_lock<std::mutex>' for 1st argument ```cpp shared_lock(shared_lock&& __sl) noexcept : shared_lock() ^ ``` **/usr/include/c++/11/shared_mutex:721:** candidate constructor not viable: requires 0 arguments, but 1 was provided ```cpp shared_lock() noexcept : _M_pm(nullptr), _M_owns(false) { } ^ ``` **/usr/include/c++/11/shared_mutex:728:** candidate constructor not viable: requires 2 arguments, but 1 was provided ```cpp shared_lock(mutex_type& __m, defer_lock_t) noexcept ^ ``` **/usr/include/c++/11/shared_mutex:731:** candidate constructor not viable: requires 2 arguments, but 1 was provided ```cpp shared_lock(mutex_type& __m, try_to_lock_t) ^ ``` **/usr/include/c++/11/shared_mutex:734:** candidate constructor not viable: requires 2 arguments, but 1 was provided ```cpp shared_lock(mutex_type& __m, adopt_lock_t) ^ ``` **/usr/include/c++/11/shared_mutex:738:** candidate constructor template not viable: requires 2 arguments, but 1 was provided ```cpp shared_lock(mutex_type& __m, ^ ``` **/usr/include/c++/11/shared_mutex:744:** candidate constructor template not viable: requires 2 arguments, but 1 was provided ```cpp shared_lock(mutex_type& __m, ^ ``` ########## be/src/agent/task_worker_pool.cpp: ########## @@ -597,9 +607,26 @@ if (!_is_work) { return; } - agent_task_req = _tasks.front(); _tasks.pop_front(); + // check if the task has been removed + std::shared_lock<std::mutex> cancel_lock(_cancel_lock); Review Comment: warning: no matching constructor for initialization of 'std::shared_lock<std::mutex>' [clang-diagnostic-error] ```cpp std::shared_lock<std::mutex> cancel_lock(_cancel_lock); ^ ``` **/usr/include/c++/11/shared_mutex:724:** candidate constructor not viable: no known conversion from 'std::shared_mutex' to 'std::shared_lock<std::mutex>::mutex_type &' (aka 'std::mutex &') for 1st argument ```cpp shared_lock(mutex_type& __m) ^ ``` **/usr/include/c++/11/shared_mutex:755:** candidate constructor not viable: no known conversion from 'std::shared_mutex' to 'const std::shared_lock<std::mutex>' for 1st argument ```cpp shared_lock(shared_lock const&) = delete; ^ ``` **/usr/include/c++/11/shared_mutex:758:** candidate constructor not viable: no known conversion from 'std::shared_mutex' to 'std::shared_lock<std::mutex>' for 1st argument ```cpp shared_lock(shared_lock&& __sl) noexcept : shared_lock() ^ ``` **/usr/include/c++/11/shared_mutex:721:** candidate constructor not viable: requires 0 arguments, but 1 was provided ```cpp shared_lock() noexcept : _M_pm(nullptr), _M_owns(false) { } ^ ``` **/usr/include/c++/11/shared_mutex:728:** candidate constructor not viable: requires 2 arguments, but 1 was provided ```cpp shared_lock(mutex_type& __m, defer_lock_t) noexcept ^ ``` **/usr/include/c++/11/shared_mutex:731:** candidate constructor not viable: requires 2 arguments, but 1 was provided ```cpp shared_lock(mutex_type& __m, try_to_lock_t) ^ ``` **/usr/include/c++/11/shared_mutex:734:** candidate constructor not viable: requires 2 arguments, but 1 was provided ```cpp shared_lock(mutex_type& __m, adopt_lock_t) ^ ``` **/usr/include/c++/11/shared_mutex:738:** candidate constructor template not viable: requires 2 arguments, but 1 was provided ```cpp shared_lock(mutex_type& __m, ^ ``` **/usr/include/c++/11/shared_mutex:744:** candidate constructor template not viable: requires 2 arguments, but 1 was provided ```cpp shared_lock(mutex_type& __m, ^ ``` -- 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. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org 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