Skip to content

Fail to partition table after changing placement rule #55705

@FullDuplexFish

Description

@FullDuplexFish

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create or replace placement policy p2 primary_region="region3", regions="region1,region2, region3";

CREATE TABLE t0(c5 FLOAT ZEROFILL PRIMARY KEY );
ALTER TABLE t0 PLACEMENT POLICY=p2;

ALTER TABLE t0 PARTITION BY HASH(c5) PARTITIONS 7;

2. What did you expect to see? (Required)

Statement executed successfully.

3. What did you see instead (Required)

mysql> ALTER TABLE t0 PARTITION BY HASH(c5) PARTITIONS 7;
ERROR 8243 (HY000): "[PD:placement:ErrBuildRuleList]build rule list failed, multiple leader replicas for range {7480000000000000FF9B00000000000000F8, 7480000000000000FF9C00000000000000F8}"

4. What is your TiDB version? (Required)

 Release Version: v8.4.0-alpha-21-g162cb15402
Edition: Community
Git Commit Hash: 162cb15402de471152a1e59e2ed5d8d1ffcbb4b0
Git Branch: master
UTC Build Time: 2024-08-22 08:12:28
GoVersion: go1.22.5
Race Enabled: false
Check Table Before Drop: false
Store: tikv

tikv was set up with partitioned raft kv
labels are as follows:

mysql> SHOW PLACEMENT LABELS;
+--------+-----------------------------------+
| Key    | Values                            |
+--------+-----------------------------------+
| host   | ["host1", "host2", "host3"]       |
| region | ["region1", "region2", "region3"] |
| zone   | ["zone1", "zone2", "zone3"]       |
+--------+-----------------------------------+
3 rows in set (0.00 sec)

Metadata

Metadata

Assignees

Labels

affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.severity/majorsig/sql-infraSIG: SQL Infratype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions