pd
pd copied to clipboard
PD RPC client provides "output regions must have leader" guarantee option
Enhancement Task
Callers sometimes have their own logic to check the leader of regions from scan regions API
https://github.com/pingcap/tidb/blob/7e73ddc91b5f9f089e84f0dc645cf71a27b2ad50/br/pkg/restore/split/split.go#L72
https://github.com/tikv/client-go/blob/88ce38492f7b30d95f4e3a7c760ba44c9a32f1be/internal/locate/region_cache.go#L2328-L2339
I prefer the client can provide an option to handle it