This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch spill_and_reserve
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/spill_and_reserve by this push:
new dff07fa3ce3 change disabled to none
dff07fa3ce3 is described below
commit dff07fa3ce371d9804b0d7027841634e8149abf4
Author: yiguolei <[email protected]>
AuthorDate: Mon Nov 25 10:07:01 2024 +0800
change disabled to none
---
be/src/runtime/workload_group/workload_group.cpp | 2 +-
be/src/runtime/workload_group/workload_group.h | 4 ++--
be/src/runtime/workload_group/workload_group_manager.cpp | 4 ++--
.../org/apache/doris/resource/workloadgroup/WorkloadGroup.java | 10 +++++-----
.../apache/doris/resource/workloadgroup/WorkloadGroupTest.java | 8 ++++----
gensrc/thrift/BackendService.thrift | 2 +-
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/be/src/runtime/workload_group/workload_group.cpp
b/be/src/runtime/workload_group/workload_group.cpp
index e554c5c2245..797b7ca7a3d 100644
--- a/be/src/runtime/workload_group/workload_group.cpp
+++ b/be/src/runtime/workload_group/workload_group.cpp
@@ -555,7 +555,7 @@ WorkloadGroupInfo WorkloadGroupInfo::parse_topic_info(
}
// 18 slot memory policy
- TWgSlotMemoryPolicy::type slot_mem_policy = TWgSlotMemoryPolicy::DISABLED;
+ TWgSlotMemoryPolicy::type slot_mem_policy = TWgSlotMemoryPolicy::NONE;
if (tworkload_group_info.__isset.slot_memory_policy) {
slot_mem_policy = tworkload_group_info.slot_memory_policy;
}
diff --git a/be/src/runtime/workload_group/workload_group.h
b/be/src/runtime/workload_group/workload_group.h
index c6dc448085b..3533f55e1b6 100644
--- a/be/src/runtime/workload_group/workload_group.h
+++ b/be/src/runtime/workload_group/workload_group.h
@@ -245,7 +245,7 @@ private:
std::atomic<int64_t> _scan_bytes_per_second {-1};
std::atomic<int64_t> _remote_scan_bytes_per_second {-1};
std::atomic<int> _total_query_slot_count = 0;
- std::atomic<TWgSlotMemoryPolicy::type> _slot_mem_policy
{TWgSlotMemoryPolicy::DISABLED};
+ std::atomic<TWgSlotMemoryPolicy::type> _slot_mem_policy
{TWgSlotMemoryPolicy::NONE};
// means workload group is mark dropped
// new query can not submit
@@ -290,7 +290,7 @@ struct WorkloadGroupInfo {
const int read_bytes_per_second = -1;
const int remote_read_bytes_per_second = -1;
const int total_query_slot_count = 0;
- const TWgSlotMemoryPolicy::type slot_mem_policy =
TWgSlotMemoryPolicy::DISABLED;
+ const TWgSlotMemoryPolicy::type slot_mem_policy =
TWgSlotMemoryPolicy::NONE;
const int write_buffer_ratio = 0;
// log cgroup cpu info
uint64_t cgroup_cpu_shares = 0;
diff --git a/be/src/runtime/workload_group/workload_group_manager.cpp
b/be/src/runtime/workload_group/workload_group_manager.cpp
index b22eb21d31d..558255ba4ff 100644
--- a/be/src/runtime/workload_group/workload_group_manager.cpp
+++ b/be/src/runtime/workload_group/workload_group_manager.cpp
@@ -381,7 +381,7 @@ void WorkloadGroupMgr::handle_paused_queries() {
"so that other query will reduce their
memory. wg: "
<< wg->debug_string();
}
- if (wg->slot_memory_policy() == TWgSlotMemoryPolicy::DISABLED)
{
+ if (wg->slot_memory_policy() == TWgSlotMemoryPolicy::NONE) {
// If not enable slot memory policy, then should spill
directly
// Maybe there are another query that use too much memory,
but we
// not encourage not enable slot memory.
@@ -757,7 +757,7 @@ void
WorkloadGroupMgr::update_queries_limit_(WorkloadGroupPtr wg, bool enable_ha
}
// Both enable overcommit and not enable overcommit, if user set slot
memory policy
// then we will replace the memtracker's memlimit with
- if (wg->slot_memory_policy() == TWgSlotMemoryPolicy::DISABLED) {
+ if (wg->slot_memory_policy() == TWgSlotMemoryPolicy::NONE) {
return;
}
int32_t total_used_slot_count = 0;
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroup.java
b/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroup.java
index d99287a0312..71fc356b82b 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroup.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/resource/workloadgroup/WorkloadGroup.java
@@ -99,9 +99,9 @@ public class WorkloadGroup implements Writable,
GsonPostProcessable {
public static final int SPILL_LOW_WATERMARK_DEFAULT_VALUE = 75;
public static final int SPILL_HIGH_WATERMARK_DEFAULT_VALUE = 90;
public static final int WRITE_BUFFER_RATIO_DEFAULT_VALUE = 20;
- public static final String SLOT_MEMORY_POLICY_DEFAULT_VALUE = "disabled";
+ public static final String SLOT_MEMORY_POLICY_DEFAULT_VALUE = "none";
public static final HashSet<String> AVAILABLE_SLOT_MEMORY_POLICY_VALUES =
new HashSet<String>() {{
- add("disabled");
+ add("none");
add("fixed");
add("dynamic");
}};
@@ -318,7 +318,7 @@ public class WorkloadGroup implements Writable,
GsonPostProcessable {
String value = properties.get(SLOT_MEMORY_POLICY).toLowerCase();
if (!AVAILABLE_SLOT_MEMORY_POLICY_VALUES.contains(value)) {
throw new DdlException("The value of '" + SLOT_MEMORY_POLICY
- + "' must be one of disabled, fixed, dynamic.");
+ + "' must be one of none, fixed, dynamic.");
}
}
@@ -621,8 +621,8 @@ public class WorkloadGroup implements Writable,
GsonPostProcessable {
}
public static TWgSlotMemoryPolicy findSlotPolicyValueByString(String
slotPolicy) {
- if (slotPolicy.equalsIgnoreCase("disabled")) {
- return TWgSlotMemoryPolicy.DISABLED;
+ if (slotPolicy.equalsIgnoreCase("none")) {
+ return TWgSlotMemoryPolicy.NONE;
} else if (slotPolicy.equalsIgnoreCase("fixed")) {
return TWgSlotMemoryPolicy.FIXED;
} else if (slotPolicy.equalsIgnoreCase("dynamic")) {
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/resource/workloadgroup/WorkloadGroupTest.java
b/fe/fe-core/src/test/java/org/apache/doris/resource/workloadgroup/WorkloadGroupTest.java
index 872a3d17b41..4d7d12b01e1 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/resource/workloadgroup/WorkloadGroupTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/resource/workloadgroup/WorkloadGroupTest.java
@@ -95,10 +95,10 @@ public class WorkloadGroupTest {
Assert.assertEquals(p1, TWgSlotMemoryPolicy.FIXED);
TWgSlotMemoryPolicy p2 =
WorkloadGroup.findSlotPolicyValueByString("dynamic");
Assert.assertEquals(p2, TWgSlotMemoryPolicy.DYNAMIC);
- TWgSlotMemoryPolicy p3 =
WorkloadGroup.findSlotPolicyValueByString("disabled");
- Assert.assertEquals(p3, TWgSlotMemoryPolicy.DISABLED);
- TWgSlotMemoryPolicy p4 =
WorkloadGroup.findSlotPolicyValueByString("disableD");
- Assert.assertEquals(p4, TWgSlotMemoryPolicy.DISABLED);
+ TWgSlotMemoryPolicy p3 =
WorkloadGroup.findSlotPolicyValueByString("none");
+ Assert.assertEquals(p3, TWgSlotMemoryPolicy.NONE);
+ TWgSlotMemoryPolicy p4 =
WorkloadGroup.findSlotPolicyValueByString("none");
+ Assert.assertEquals(p4, TWgSlotMemoryPolicy.NONE);
boolean hasException = false;
try {
WorkloadGroup.findSlotPolicyValueByString("disableDa");
diff --git a/gensrc/thrift/BackendService.thrift
b/gensrc/thrift/BackendService.thrift
index c016d9ba5c8..33f6b0d32f3 100644
--- a/gensrc/thrift/BackendService.thrift
+++ b/gensrc/thrift/BackendService.thrift
@@ -254,7 +254,7 @@ enum TTopicInfoType {
}
enum TWgSlotMemoryPolicy {
- DISABLED = 0,
+ NONE = 0,
FIXED = 1,
DYNAMIC = 2
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]