Abnormal Increase in TiKV Leader Count and Regions in TiDB Test Cluster in Production Environment

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

Original topic: 生产环境tidb 测试集群tikv leade数量和region异常增长

| username: 田帅萌7

【TiDB Usage Environment】Production Environment / Testing / PoC
【TiDB Version】v7.5.1
【Reproduction Path】What operations were performed that caused the issue
【Encountered Issue: Issue Phenomenon and Impact】
【Resource Configuration】Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
【Attachments: Screenshots/Logs/Monitoring】

Suddenly, the empty-region-count and undersized-region-count increased.

| username: WalterWj | Original post link

Check the DDL, it should be that an empty table was manually created, pre-split into many regions, or manually split.

| username: 田帅萌7 | Original post link

The default value of tidb_dml_batch_size is 2000.

| username: 有猫万事足 | Original post link

Additionally, there are partition tables based on time, such as those created monthly up to the year 2025, with pre-split parameters added. The empty-region-count and undersized-region-count will both increase and decrease relatively slowly, which is normal.

| username: 田帅萌7 | Original post link

The image is not available for translation. Please provide the text content directly.

| username: forever | Original post link

Please share the DDL of this table.

| username: 有猫万事足 | Original post link

Need to confirm the table structure, is it a partitioned table?

| username: 田帅萌7 | Original post link

You should

| username: TiDBer_小阿飞 | Original post link

Isn’t there a problem with having 8192 partitions for the partition key?

| username: dba-kit | Original post link

Since the partition keys are already time fields, why not use range partitioning…

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

Just go to SELECT * FROM INFORMATION_SCHEMA.TIKV_REGION_STATUS; and check which table has the most empty regions.

| username: system | Original post link

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