The modified configuration does not load after reloading the configuration file

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 修改配置文件reload后修改的配置加载不上

| username: TiDBer_OzwiOwPc

Previously, I set the merge-schedule-limit to 16 to merge regions. After the merge, I changed it back to 8. After modifying the configuration file and reloading, the PD log shows as follows:


The configuration file on the PD server is as follows:

However, the query result in the database is as follows:

The modified configuration has been applied, and the PD was started with the new parameters. Why does the command line query still show the old parameters?

| username: zhaokede | Original post link

This file is auto-generated, please do not edit. All your modifications will be overwritten.

| username: DBAER | Original post link

Does it still not take effect after setting the config?

| username: TiDBer_OzwiOwPc | Original post link

set config takes effect

| username: TiDBer_OzwiOwPc | Original post link

I just did a normal edit-config and then reloaded. Posting pd.toml is just to prove that the configuration was indeed delivered.

| username: 裤衩儿飞上天 | Original post link

How was it changed before?
I remember that the values set by the command line parameters will override the values in the configuration file, and the ones set by the command line will be stored in etcd.
You can check it out in detail~

| username: TiDBer_OzwiOwPc | Original post link

At first, I found that modifying edit-config was ineffective, so I changed it via the command line. Does it mean that once it’s changed via the command line, any subsequent modifications through edit-config, regardless of what is changed, will be ineffective?

| username: 裤衩儿飞上天 | Original post link

The default value of tidb_dml_batch_size is 20000.

| username: oceanzhang | Original post link

The edit will take effect next time, right?

| username: TiDBer_OzwiOwPc | Original post link

So, the configuration file values are only re-initialized when the cluster is restarted? Do I have to use command line for any configuration changes now? Currently, any changes made through the configuration file are not taking effect.

| username: TiDBer_QYr0vohO | Original post link

Did the edit-config not take effect?

| username: 裤衩儿飞上天 | Original post link

Refer to the section on modifying PD configuration online: Online Modify Cluster Configuration | PingCAP Documentation Center

| username: 裤衩儿飞上天 | Original post link

Not all PD configurations can be modified online. You can check the specific list in the link I sent you in my previous reply.

| username: TiDBer_OzwiOwPc | Original post link

I really don’t understand. I just tried to modify the log level and reloaded it. After checking on the PD server, the configuration file has been updated, but the startup log of PD still shows the old configuration.

| username: TiDBer_OzwiOwPc | Original post link

I have seen this. I understand that the configuration file modified by edit-config should take effect when reloaded and PD restarts. However, after loading the configuration file, it will still load the old configuration from etcd. If there are old configurations in the related items, they will overwrite the configurations read from the configuration file. Is that what it means?

| username: TiDBer_OzwiOwPc | Original post link

Can it be understood that all the configurations that can be modified online in PD can only take effect in the configuration file when the cluster is started for the first time, and later they all need to be modified online?

| username: 裤衩儿飞上天 | Original post link

Yes, from now on, everything will be based on etcd.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.