github-actions[bot] commented on code in PR #42418:
URL: https://github.com/apache/doris/pull/42418#discussion_r1815248011
##########
be/src/runtime/workload_group/workload_group_manager.cpp:
##########
@@ -595,21 +645,15 @@
return true;
}
-void WorkloadGroupMgr::update_queries_limit(WorkloadGroupPtr wg, bool
enable_hard_limit) {
+void WorkloadGroupMgr::update_queries_limit_(WorkloadGroupPtr wg, bool
enable_hard_limit) {
Review Comment:
warning: function 'update_queries_limit_' exceeds recommended
size/complexity thresholds [readability-function-size]
```cpp
void WorkloadGroupMgr::update_queries_limit_(WorkloadGroupPtr wg, bool
enable_hard_limit) {
^
```
<details>
<summary>Additional context</summary>
**be/src/runtime/workload_group/workload_group_manager.cpp:647:** 95 lines
including whitespace and comments (threshold 80)
```cpp
void WorkloadGroupMgr::update_queries_limit_(WorkloadGroupPtr wg, bool
enable_hard_limit) {
^
```
</details>
##########
be/src/runtime/workload_group/workload_group_manager.cpp:
##########
@@ -264,43 +262,27 @@ void WorkloadGroupMgr::add_paused_query(const
std::shared_ptr<QueryContext>& que
}
}
-/**
- * 1. When Process's memory is lower than soft limit, then all workload group
will be converted to hard limit (Exception: there is only one workload group).
- * 2. Reserve logic for workload group that is soft limit take no effect, it
will always return success.
- * 3. QueryLimit for streamload,routineload,group commit, take no affect, it
will always return success, but workload group's hard limit will take affect.
- * 4. See handle_non_overcommit_wg_paused_queries for hard limit logic.
- */
-void WorkloadGroupMgr::handle_paused_queries() {
- handle_non_overcommit_wg_paused_queries();
- handle_overcommit_wg_paused_queries();
-}
-
/**
* Strategy 1: A revocable query should not have any running
task(PipelineTask).
* strategy 2: If the workload group has any task exceed workload group
memlimit, then set all queryctx's memlimit
* strategy 3: If any query exceed process memlimit, then should clear all
caches.
* strategy 4: If any query exceed query's memlimit, then do spill disk or
cancel it.
* strategy 5: If any query exceed process's memlimit and cache is zero, then
do following:
- * 1. cancel other wg's(soft limit) query that exceed limit
- * 2. spill disk
- * 3. cancel it self.
*/
-void WorkloadGroupMgr::handle_non_overcommit_wg_paused_queries() {
+void WorkloadGroupMgr::handle_paused_queries() {
Review Comment:
warning: function 'handle_paused_queries' exceeds recommended
size/complexity thresholds [readability-function-size]
```cpp
void WorkloadGroupMgr::handle_paused_queries() {
^
```
<details>
<summary>Additional context</summary>
**be/src/runtime/workload_group/workload_group_manager.cpp:271:** 189 lines
including whitespace and comments (threshold 80)
```cpp
void WorkloadGroupMgr::handle_paused_queries() {
^
```
</details>
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]