This is an automated email from the ASF dual-hosted git repository.

wangbo pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 38bce218280 [Fix](executor)Add workload group upgrade check. (#35004)
38bce218280 is described below

commit 38bce21828048507b395b81f4581e686f96110cd
Author: wangbo <wan...@apache.org>
AuthorDate: Tue May 28 20:54:50 2024 +0800

    [Fix](executor)Add workload group upgrade check. (#35004)
---
 .../data/workload_manager_p0/test_check_wg.out     | 24 +++++++++++++
 .../suites/workload_manager_p0/load.groovy         | 40 ++++++++++++++++++++++
 .../workload_manager_p0/test_check_wg.groovy       | 20 +++++++++++
 3 files changed, 84 insertions(+)

diff --git a/regression-test/data/workload_manager_p0/test_check_wg.out 
b/regression-test/data/workload_manager_p0/test_check_wg.out
new file mode 100644
index 00000000000..5bad827bd4f
--- /dev/null
+++ b/regression-test/data/workload_manager_p0/test_check_wg.out
@@ -0,0 +1,24 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !count_wg --
+3
+
+-- !select_wg --
+normal cpu_share       10
+normal enable_memory_overcommit        true
+normal max_concurrency 2147483647
+normal max_queue_size  0
+normal memory_limit    30%
+normal queue_timeout   0
+upgrade_g1     cpu_share       11
+upgrade_g1     enable_memory_overcommit        true
+upgrade_g1     max_concurrency 2147483647
+upgrade_g1     max_queue_size  0
+upgrade_g1     memory_limit    0.2%
+upgrade_g1     queue_timeout   0
+upgrade_g2     cpu_share       12
+upgrade_g2     enable_memory_overcommit        true
+upgrade_g2     max_concurrency 2147483647
+upgrade_g2     max_queue_size  0
+upgrade_g2     memory_limit    0.3%
+upgrade_g2     queue_timeout   0
+
diff --git a/regression-test/suites/workload_manager_p0/load.groovy 
b/regression-test/suites/workload_manager_p0/load.groovy
new file mode 100644
index 00000000000..d662e77500d
--- /dev/null
+++ b/regression-test/suites/workload_manager_p0/load.groovy
@@ -0,0 +1,40 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+suite("test_create_upgrade_wg") {
+    sql "ADMIN SET FRONTEND CONFIG ('enable_workload_group' = 'true');"
+
+    sql "create workload group if not exists normal " +
+            "properties ( " +
+            "    'cpu_share'='10', " +
+            "    'memory_limit'='30%', " +
+            "    'enable_memory_overcommit'='true' " +
+            ");"
+
+    sql "create workload group if not exists upgrade_g1 " +
+            "properties ( " +
+            "    'cpu_share'='11', " +
+            "    'memory_limit'='0.2%', " +
+            "    'enable_memory_overcommit'='true' " +
+            ");"
+
+    sql "create workload group if not exists upgrade_g2 " +
+            "properties ( " +
+            "    'cpu_share'='12', " +
+            "    'memory_limit'='0.3%', " +
+            "    'enable_memory_overcommit'='true' " +
+            ");"
+}
\ No newline at end of file
diff --git a/regression-test/suites/workload_manager_p0/test_check_wg.groovy 
b/regression-test/suites/workload_manager_p0/test_check_wg.groovy
new file mode 100644
index 00000000000..5dfe6e65fea
--- /dev/null
+++ b/regression-test/suites/workload_manager_p0/test_check_wg.groovy
@@ -0,0 +1,20 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+suite("test_check_wg") {
+    qt_count_wg "select count(distinct id) from  workload_groups();"
+    qt_select_wg "select name,item,value from workload_groups() order by 
name,item,value;"
+}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to