This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit f570193e540ce9f14ffb3af263d031e7bd086b80 Author: wangbo <wan...@apache.org> AuthorDate: Thu Feb 8 11:19:25 2024 +0800 Alter workload group queue prop sync for regression test (#30869) --- fe/fe-common/src/main/java/org/apache/doris/common/Config.java | 4 ++++ .../org/apache/doris/resource/workloadgroup/WorkloadGroupMgr.java | 4 ++++ regression-test/suites/workload_manager_p0/test_curd_wlg.groovy | 6 +----- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java index 5a239a8c407..2bb6173acd8 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java +++ b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java @@ -1694,6 +1694,10 @@ public class Config extends ConfigBase { @ConfField(mutable = true) public static boolean enable_query_queue = true; + // used for regression test + @ConfField(mutable = true) + public static boolean enable_alter_queue_prop_sync = false; + @ConfField(mutable = true) public static long query_queue_update_interval_ms = 5000; diff --git a/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroupMgr.java b/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroupMgr.java index 31b4a81c1d4..44c5de41947 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroupMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroupMgr.java @@ -333,6 +333,10 @@ public class WorkloadGroupMgr implements Writable, GsonPostProcessable { checkGlobalUnlock(newWorkloadGroup, currentWorkloadGroup); nameToWorkloadGroup.put(workloadGroupName, newWorkloadGroup); idToWorkloadGroup.put(newWorkloadGroup.getId(), newWorkloadGroup); + // NOTE: used for regression test query queue + if (Config.enable_alter_queue_prop_sync) { + resetQueryQueueProp(); + } Env.getCurrentEnv().getEditLog().logAlterWorkloadGroup(newWorkloadGroup); } finally { writeUnlock(); diff --git a/regression-test/suites/workload_manager_p0/test_curd_wlg.groovy b/regression-test/suites/workload_manager_p0/test_curd_wlg.groovy index aeea4e443ce..3e56525acca 100644 --- a/regression-test/suites/workload_manager_p0/test_curd_wlg.groovy +++ b/regression-test/suites/workload_manager_p0/test_curd_wlg.groovy @@ -278,11 +278,10 @@ suite("test_crud_wlg") { } // test query queue limit - sql "ADMIN SET FRONTEND CONFIG ('query_queue_update_interval_ms' = '500');" + sql "ADMIN SET FRONTEND CONFIG ('enable_alter_queue_prop_sync' = 'true');" sql "set workload_group=test_group;" sql "alter workload group test_group properties ( 'max_concurrency'='0' );" sql "alter workload group test_group properties ( 'max_queue_size'='0' );" - Thread.sleep(5000); test { sql "select /*+SET_VAR(parallel_fragment_exec_instance_num=1)*/ * from ${table_name};" @@ -305,7 +304,6 @@ suite("test_crud_wlg") { sql "alter workload group test_group properties ( 'max_queue_size'='1' );" sql "alter workload group test_group properties ( 'queue_timeout'='500' );" - Thread.sleep(5000); test { sql "select /*+SET_VAR(parallel_fragment_exec_instance_num=1)*/ * from ${table_name};" @@ -313,9 +311,7 @@ suite("test_crud_wlg") { } sql "alter workload group test_group properties ( 'max_concurrency'='10' );" - Thread.sleep(5000); sql "select 1;" sql "set workload_group=normal;" sql "drop workload group test_group;" - sql "ADMIN SET FRONTEND CONFIG ('query_queue_update_interval_ms' = '5000');" } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org