This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new 8bb59d3c948 branch-3.1: [fix](cloud)Fix auto start affected by daemon
jobs #51729 (#52521)
8bb59d3c948 is described below
commit 8bb59d3c9481c86b0dea3ac79430175074315be8
Author: deardeng <[email protected]>
AuthorDate: Tue Jul 1 19:06:59 2025 +0800
branch-3.1: [fix](cloud)Fix auto start affected by daemon jobs #51729
(#52521)
cherry pick from #51729
---
fe/fe-common/src/main/java/org/apache/doris/common/Config.java | 9 +++++++++
.../org/apache/doris/cloud/system/CloudSystemInfoService.java | 9 ++++++---
2 files changed, 15 insertions(+), 3 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 23da54f52a0..6ee7553ed77 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
@@ -3330,6 +3330,15 @@ public class Config extends ConfigBase {
"In cloud mode, the retry number when the FE requests the meta
service times out is 1 by default"})
public static int meta_service_rpc_timeout_retry_times = 1;
+ @ConfField(mutable = true, description =
{"存算分离模式下自动启停功能,对于该配置中的数据库名不进行唤醒操作,"
+ + "用于内部作业的数据库,例如统计信息用到的数据库,"
+ + "举例: auto_start_ignore_db_names=__internal_schema,
information_schema",
+ "In the cloud mode, the automatic start and stop ignores the DB
name of the internal job,"
+ + "used for databases involved in internal jobs, such as those
used for statistics, "
+ + "For example: auto_start_ignore_db_names=__internal_schema,
information_schema"
+ })
+ public static String[] auto_start_ignore_resume_db_names =
{"__internal_schema", "information_schema"};
+
// ATTN: DONOT add any config not related to cloud mode here
// ATTN: DONOT add any config not related to cloud mode here
// ATTN: DONOT add any config not related to cloud mode here
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
b/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
index 6603c29b1e4..f3583fa5487 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java
@@ -56,6 +56,7 @@ import org.apache.logging.log4j.Logger;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
@@ -1024,9 +1025,11 @@ public class CloudSystemInfoService extends
SystemInfoService {
LOG.debug("auto start wait cluster {} status {}", clusterName,
clusterStatus);
if (Cloud.ClusterStatus.valueOf(clusterStatus) !=
Cloud.ClusterStatus.NORMAL) {
// ATTN: prevent `Automatic Analyzer` daemon threads from pulling
up clusters
- // root ? see StatisticsUtil.buildConnectContext
- if (ConnectContext.get() != null &&
ConnectContext.get().getUserIdentity().isRootUser()) {
- LOG.warn("auto start daemon thread run in root, not resume
cluster {}-{}", clusterName, clusterStatus);
+ // FeConstants.INTERNAL_DB_NAME ? see
StatisticsUtil.buildConnectContext
+ List<String> ignoreDbNameList =
Arrays.asList(Config.auto_start_ignore_resume_db_names);
+ if (ConnectContext.get() != null &&
ignoreDbNameList.contains(ConnectContext.get().getDatabase())) {
+ LOG.warn("auto start daemon thread db {}, not resume cluster
{}-{}",
+ ConnectContext.get().getDatabase(), clusterName,
clusterStatus);
return null;
}
Cloud.AlterClusterRequest.Builder builder =
Cloud.AlterClusterRequest.newBuilder();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]