tikv / tikv/pd

Let PD check regions before splitting regions

Open
#2,733 6 comments 0 reactions 1 assignee Claimed by @Yisaer View on GitHub
affects-8.1 report/customer type/enhancement
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Feature Request

### Describe your feature request related problem
Currently, for the splitting table cases, TiDB will notify TiKV to splitting the regions first, after the spllitting finished, the TiDB will inform PD to do the scattering job. However, in real workloads, during splitting, the status of the initial regions might be invalid from PD's perspective(non-replicated). So after splitting finished, the newly-created regions will also be invalid and PD will refuse to scatter these regions and wait coordinator to fix these regions which make the whole splitting process unstable in real workload.

### Describe the feature you'd like
1. Before TiDB splitting regions, let tidb notify PD to check the target regions and try to fix the invalid regions.
2. Before PD scattering regions, PD should check the regions and try to fix the invalid region with High priority instead of letting coordinator find it.

### Describe alternatives you've considered

### Teachability, Documentation, Adoption, Migration Strategy

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.