Scatter region should check success status #46001
Labels
affects-7.5
component/br
This issue is related to BR of TiDB.
may-affects-5.2
This bug maybe affects 5.2.x versions.
may-affects-5.3
This bug maybe affects 5.3.x versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
severity/major
type/bug
The issue is confirmed as a bug.
Bug Report
For BR or using the
tidb_scatter_region
variable, we need to check the success status of the scatter operator. When we create a table, if the region is just splitted, the size might be the original region's size/n, which could not be less than 1. So PD will regard those regions as non-empty regions. Then they might be filtered by store limit.But BR and client-go will think the scatter region succeeds since they are not in running status but cancel status.
https://github.com/tikv/tikv/blob/9dc7450ef22abde48e14e61fc16d4f22b137d450/components/raftstore/src/store/fsm/peer.rs#L4030-L4031
BR:
tidb/br/pkg/restore/split.go
Line 209 in 66033d5
client-go:
https://github.com/tikv/client-go/blob/8a214402da13d5bdc1ffb1d2726bdbb47f9beb74/tikv/split_region.go#L287
https://github.com/tikv/client-go/blob/8a214402da13d5bdc1ffb1d2726bdbb47f9beb74/tikv/split_region.go#L325
The lightning has already been fixed through #33625.
The text was updated successfully, but these errors were encountered: