Skip to content

regions API unavailable when there are too many regions  #55872

@you06

Description

@you06

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Run the following bash script.

mysql -h 127.0.0.1 -P 4000 -u root -D test --comments -e "drop table if exists t"
mysql -h 127.0.0.1 -P 4000 -u root -D test --comments -e "create table t(id bigint primary key)"

for i in {1..100}
do
    mysql -h 127.0.0.1 -P 4000 -u root -D test --comments -e "SPLIT TABLE t BETWEEN ($(($i))000000) AND ($(( $i + 1 ))000000) REGIONS 1000" > /dev/null &
done

wait

curl http://127.0.0.1:10080/tables/test/t/regions

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

The curl command print the regions of the table.

3. What did you see instead (Required)

The curl command returns error like:

rpc error: code = ResourceExhausted desc = grpc: received message larger than max (8888180 vs. 4194304)

4. What is your TiDB version? (Required)

Release Version: v8.4.0-alpha-94-g3578e29613
Edition: Community
Git Commit Hash: 3578e29613771c649e1f8fa4a3e27d3e3b83f0a0
Git Branch: HEAD
UTC Build Time: 2024-09-05 01:36:02
GoVersion: go1.21.10
Race Enabled: false
Check Table Before Drop: false
Store: tikv

Metadata

Metadata

Assignees

Labels

affects-5.4This bug affects the 5.4.x(LTS) versions.affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.component/pdreport/customerCustomers have encountered this bug.severity/majortype/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