github-actions[bot] commented on code in PR #30829:
URL: https://github.com/apache/doris/pull/30829#discussion_r1477718569


##########
be/src/runtime/task_group/task_group.h:
##########
@@ -142,9 +142,15 @@ class TaskGroup : public 
std::enable_shared_from_this<TaskGroup> {
         return _memory_limit > 0;
     }
 
-    void add_query(TUniqueId query_id) { _query_id_set.insert(query_id); }
+    void add_query(TUniqueId query_id) {

Review Comment:
   warning: method 'add_query' can be made static 
[readability-convert-member-functions-to-static]
   
   ```suggestion
       static void add_query(TUniqueId query_id) {
   ```
   



##########
be/src/runtime/task_group/task_group.h:
##########
@@ -142,9 +142,15 @@
         return _memory_limit > 0;
     }
 
-    void add_query(TUniqueId query_id) { _query_id_set.insert(query_id); }
+    void add_query(TUniqueId query_id) {
+        std::unique_lock<std::shared_mutex> wlock;
+        _query_id_set.insert(query_id);
+    }
 
-    void remove_query(TUniqueId query_id) { _query_id_set.erase(query_id); }
+    void remove_query(TUniqueId query_id) {

Review Comment:
   warning: method 'remove_query' can be made static 
[readability-convert-member-functions-to-static]
   
   ```suggestion
       static void remove_query(TUniqueId query_id) {
   ```
   



-- 
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

Reply via email to