Skip to content

Commit

Permalink
[improvement](deploy) Forbid LocalDeployManager drop node
Browse files Browse the repository at this point in the history
  • Loading branch information
zxealous committed Sep 4, 2023
1 parent 7727535 commit 988e618
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/en/docs/admin-manual/config/fe-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -2768,3 +2768,8 @@ Default:true

Temporary configuration option. After it is enabled, a background thread will be started to automatically modify all olap tables to light schema change. The modification results can be viewed through the command `show convert_light_schema_change [from db]`, and the conversion results of all non-light schema change tables will be displayed.

#### `disable_local_deploy_manager_drop_node`

Default:true

Forbid LocalDeployManager drop nodes to prevent errors in the cluster.info file from causing nodes to be dropped.
8 changes: 7 additions & 1 deletion docs/zh-CN/docs/admin-manual/config/fe-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -2769,4 +2769,10 @@ show data (其他用法:HELP SHOW DATA)

默认值:true

暂时性配置项,开启后会启动后台线程自动将所有的olap表修改为可light schema change,修改结果可通过命令`show convert_light_schema_change [from db]` 来查看,将会展示所有非light schema change表的转换结果
暂时性配置项,开启后会启动后台线程自动将所有的olap表修改为可light schema change,修改结果可通过命令`show convert_light_schema_change [from db]` 来查看,将会展示所有非light schema change表的转换结果

#### `disable_local_deploy_manager_drop_node`

默认值:true

禁止LocalDeployManager删除节点,防止cluster.info文件有误导致节点被删除。
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Licensed to the Apache Software Foundation (ASF) under one
// 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
Expand Down Expand Up @@ -2153,4 +2154,8 @@ public class Config extends ConfigBase {
})
public static long query_metadata_name_ids_timeout = 3;

@ConfField(mutable = true, masterOnly = true, description = {
"是否禁止LocalDeployManager删除节点",
"Whether to disable LocalDeployManager drop node"})
public static boolean disable_local_deploy_manager_drop_node = true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.doris.common.Pair;
import org.apache.doris.common.UserException;
import org.apache.doris.common.util.MasterDaemon;
import org.apache.doris.deploy.impl.LocalFileDeployManager;
import org.apache.doris.ha.FrontendNodeType;
import org.apache.doris.system.Backend;
import org.apache.doris.system.Frontend;
Expand Down Expand Up @@ -480,6 +481,10 @@ private void inspectNodeChange(List<HostInfo> remoteHostInfos,
HostInfo foundHostInfo = getFromHostInfos(remoteHostInfos, localHostInfo);
boolean needDrop = needDrop(foundHostInfo != null, localHostInfo);
if (needDrop) {
if (this instanceof LocalFileDeployManager && Config.disable_local_deploy_manager_drop_node) {
LOG.warn("For now, Local File Deploy Manager dose not handle shrinking operations");
continue;
}
dealDropLocal(localHostInfo, nodeType);
}
}
Expand Down

0 comments on commit 988e618

Please sign in to comment.