Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3307,6 +3307,15 @@ public static int metaServiceRpcRetryTimes() {
"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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
Expand Down Expand Up @@ -1024,9 +1025,11 @@ public String waitForAutoStart(String clusterName) throws DdlException {
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();
Expand Down
Loading