SelectDB Enterprise
管控指南
Open API
FE HTTP
Set Config Action

Set Config Action

Request

GET /api/_set_config

Description

用于动态设置 FE 的参数。该命令等同于通过 ADMIN SET FRONTEND CONFIG 命令。但该命令仅会设置对应 FE 节点的配置。并且不会自动转发 MasterOnly 配置项给 Master FE 节点。

Path parameters

Query parameters

  • confkey1=confvalue1

    指定要设置的配置名称,其值为要修改的配置值。

  • persist

    是否要将修改的配置持久化。默认为 false,即不持久化。如果为 true,这修改后的配置项会写入 fe_custom.conf 文件中,并在 FE 重启后仍会生效。

  • reset_persist

    是否要清空原来的持久化配置,只在 persist 参数为 true 时生效。为了兼容原来的版本,reset_persist 默认为 true。
    如果 persist 设为 true,不设置 reset_persist 或 reset_persist 为 true,将先清空fe_custom.conf文件中的配置再将本次修改的配置写入fe_custom.conf
    如果 persist 设为 true,reset_persist 为 false,本次修改的配置项将会增量添加到fe_custom.conf

Request body

Response

{
	"msg": "success",
	"code": 0,
	"data": {
		"set": {
			"key": "value"
		},
		"err": [
			{
		       "config_name": "",
		       "config_value": "",
		       "err_info": ""
		    }
		],
		"persist":""
	},
	"count": 0
}

set 字段表示设置成功的配置。err 字段表示设置失败的配置。 persist 字段表示持久化信息。

Examples

  1. 设置 storage_min_left_capacity_bytesreplica_ack_policyagent_task_resend_wait_time_ms 三个配置的值。

    GET /api/_set_config?storage_min_left_capacity_bytes=1024&replica_ack_policy=SIMPLE_MAJORITY&agent_task_resend_wait_time_ms=true
    
    Response:
    {
    "msg": "success",
    "code": 0,
    "data": {
        "set": {
            "storage_min_left_capacity_bytes": "1024"
        },
        "err": [
            {
                "config_name": "replica_ack_policy",
                "config_value": "SIMPLE_MAJORITY",
                "err_info": "Not support dynamic modification."
            },
            {
                "config_name": "agent_task_resend_wait_time_ms",
                "config_value": "true",
                "err_info": "Unsupported configuration value type."
            }
        ],
        "persist": ""
    },
    "count": 0
    }
    
    storage_min_left_capacity_bytes 设置成功;  
    replica_ack_policy 设置失败,原因是该配置项不支持动态修改; 
    agent_task_resend_wait_time_ms 设置失败,因为该配置项类型为 long,设置 boolean 类型失败。
  2. 设置 max_bytes_per_broker_scanner 并持久化

    GET /api/_set_config?max_bytes_per_broker_scanner=21474836480&persist=true&reset_persist=false
    
    Response:
    {
    "msg": "success",
    "code": 0,
    "data": {
        "set": {
            "max_bytes_per_broker_scanner": "21474836480"
        },
        "err": [],
        "persist": "ok"
    },
    "count": 0
    }

    fe/conf 目录生成 fe_custom.conf:

    #THIS IS AN AUTO GENERATED CONFIG FILE.
    #You can modify this file manually, and the configurations in this file
    #will overwrite the configurations in fe.conf
    #Wed Jul 28 12:43:14 CST 2021
    max_bytes_per_broker_scanner=21474836480
© 2025 北京飞轮数据科技有限公司 京ICP备2022004029号 | Apache、Apache Doris 以及相关开源项目名称均为 Apache 基金会商标