pingcap / pingcap/tidb

tikv config set fail but sql command return a success + warning

Open
#59,856 0 comments 0 reactions 0 assignees View on GitHub
affects-7.5 affects-8.1 affects-8.5 component/tikv severity/moderate type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

set tikv config in multiple tikv env. all tikv return fail for this operation, but sql layer returns success. the fail message is only displayed in warning.

```sql
mysql> show config where name like '%region-split-size%';
+------+---------------------------------------------------------------+-------------------------------+--------+
| Type | Instance | Name | Value |
+------+---------------------------------------------------------------+-------------------------------+--------+
| tikv | tc-tikv-0.tc-tikv-peer.testbed-endless-client-9jcws.svc:20160 | coprocessor.region-split-size | 256MiB |
| tikv | tc-tikv-1.tc-tikv-peer.testbed-endless-client-9jcws.svc:20160 | coprocessor.region-split-size | 256MiB |
| tikv | tc-tikv-2.tc-tikv-peer.testbed-endless-client-9jcws.svc:20160 | coprocessor.region-split-size | 256MiB |
+------+---------------------------------------------------------------+-------------------------------+--------+
3 rows in set (0.05 sec)

mysql> show config where name like '%region-max-size%';
+------+---------------------------------------------------------------+-----------------------------+--------+
| Type | Instance | Name | Value |
+------+---------------------------------------------------------------+-----------------------------+--------+
| tikv | tc-tikv-0.tc-tikv-peer.testbed-endless-client-9jcws.svc:20160 | coprocessor.region-max-size | 384MiB |
| tikv | tc-tikv-1.tc-tikv-peer.testbed-endless-client-9jcws.svc:20160 | coprocessor.region-max-size | 384MiB |
| tikv | tc-tikv-2.tc-tikv-peer.testbed-endless-client-9jcws.svc:20160 | coprocessor.region-max-size | 384MiB |
+------+---------------------------------------------------------------+-----------------------------+--------+
3 rows in set (0.05 sec)

mysql> set config tikv `coprocessor.region-split-size`='512MiB';
Query OK, 0 rows affected, 3 warnings (0.07 sec)

mysql> show warnings;
+---------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 1105 | bad request to http://10.233.80.199:20180/config: failed to update, error: Other("[components/raftstore/src/coprocessor/config.rs:181]: region max size 402653184 must >= split size 536870912") |
| Warning | 1105 | bad request to http://10.233.66.205:20180/config: failed to update, error: Other("[components/raftstore/src/coprocessor/config.rs:181]: region max size 402653184 must >= split size 536870912") |
| Warning | 1105 | bad request to http://10.233.82.224:20180/config: failed to update, error: Other("[components/raftstore/src/coprocessor/config.rs:181]: region max size 402653184 must >= split size 536870912") |
+---------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.01 sec)

mysql> select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.5.0-alpha
Edition: Community
Git Commit Hash: afe8a09e928c67188cbd94eb033ab17916a3eb3a
Git Branch: heads/refs/tags/v8.5.0-alpha
UTC Build Time: 2024-11-18 11:57:41
GoVersion: go1.23.3
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

mysql>

mysql> show config where name like '%region-split-size%';
+------+---------------------------------------------------------------+-------------------------------+--------+
| Type | Instance | Name | Value |
+------+---------------------------------------------------------------+-------------------------------+--------+
| tikv | tc-tikv-1.tc-tikv-peer.testbed-endless-client-9jcws.svc:20160 | coprocessor.region-split-size | 256MiB |
| tikv | tc-tikv-2.tc-tikv-peer.testbed-endless-client-9jcws.svc:20160 | coprocessor.region-split-size | 256MiB |
| tikv | tc-tikv-0.tc-tikv-peer.testbed-endless-client-9jcws.svc:20160 | coprocessor.region-split-size | 256MiB |
+------+---------------------------------------------------------------+-------------------------------+--------+
3 rows in set (0.05 sec)
```

### 2. What did you expect to see? (Required)
sql returns fail
### 3. What did you see instead (Required)
sql returns success

### 4. What is your TiDB version? (Required)

8.5.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.