Error When Modifying TiKV Configuration Online

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

Original topic: tikv在线修改配置报错

| username: 我家有个臭皮崽

Error when modifying the labels attribute of tikv online

| username: hey-hoho | Original post link

The error message indicates that modifying the labels attribute is prohibited.

| username: 我家有个臭皮崽 | Original post link

So the label attribute cannot be dynamically modified after the tikvserver is started, right?

| username: 啦啦啦啦啦 | Original post link

I didn’t see labels in the dynamically supported configuration items.
Try using tiup cluster edit-config.

| username: 我家有个臭皮崽 | Original post link

That’s right, my current cluster doesn’t use the tiup tool. After starting, I use pd-ctl/tikv-ctl to modify the configuration.

| username: 我家有个臭皮崽 | Original post link

This is configured using TiDB’s SQL statements, right?

| username: 啦啦啦啦啦 | Original post link

The same

| username: 我家有个臭皮崽 | Original post link

However, when I use this command to modify the labels attribute of TiKV online, it reports an error.

| username: 我家有个臭皮崽 | Original post link

./tikv-ctl --host 127.0.0.1:50160 modify-tikv-config -n server.labels -v “az=“1””
DebugClient::modify_tikv_config: RpcFailure: 2-UNKNOWN “failed to update config, err: “config labels cannot be changed””

| username: 啦啦啦啦啦 | Original post link

Because it is not supported. The link I posted above does not mention support for dynamically modifying the labels attribute.

| username: 我家有个臭皮崽 | Original post link

Okay, so if I want to do multi-region deployment, I must first statically configure the labels for TiKV and then start it, right?

| username: 啦啦啦啦啦 | Original post link

Is the absence of the tiup tool because the version is lower than 4.0?

| username: 我家有个臭皮崽 | Original post link

It’s not that, it’s deployed on k8s.

| username: WalterWj | Original post link

There is an operator for k8s deployment, isn’t the configuration modified in the same way?

| username: 我家有个臭皮崽 | Original post link

Alright…

| username: tidb菜鸟一只 | Original post link

This error clearly indicates that online modification is not supported, right?

| username: 我家有个臭皮崽 | Original post link

Yes, the labels setting of TiKV does not support online modification.

| username: Soysauce520 | Original post link

Check if there are any mistakes. If it’s correct and you still want to make changes, it’s recommended to test it in a testing environment first. Some parameters cannot be changed online, but you can modify the YAML file.

| username: system | Original post link

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