Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improvement](deploy) Forbid LocalDeployManager drop node #23875

Merged
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
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
Expand Up @@ -2153,4 +2153,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