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


##########
fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroupMgr.java:
##########
@@ -273,8 +273,8 @@ private void checkGlobalUnlock(WorkloadGroup newWg, 
WorkloadGroup oldWg) throws
             }
         }
 
-        // 4 check wg num
-        if (isCreateStmt && wgNumOfCurrentCg >= Config.workload_group_max_num) 
{
+        // The count already includes the workload group being created.
+        if (isCreateStmt && wgNumOfCurrentCg > Config.workload_group_max_num) {

Review Comment:
   [P2] Reserve a slot for `normal` before it exists. In non-cloud mode, 
`CREATE WORKLOAD GROUP ... FOR <tag>` accepts a valid tag even when no backend 
has it, so an admin can create `workload_group_max_num` custom groups before 
the checker sees that tag. When a backend later joins it, 
`createNormalWorkloadGroup` inserts `normal` directly into both maps and the 
compute group ends up one over the configured limit. Please count the pending 
default group when validating a create, and cover this creation order in the 
test.



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

Reply via email to