Compatibility statement regarding Placement Rules in SQL and PD location-labels
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Enhancement Task
Users following the official documentation to create placement policies using placement rule in SQL have found discrepancies between peer distribution and the location-labels setting.
The rules set by the location-labels configuration in PD won't take effect automatically unless the same rules are specified using SURVIVAL_PREFERENCES when creating placement policy. https://docs.pingcap.com/zh/tidb/stable/placement-rules-in-sql#%E6%8C%87%E5%AE%9A%E7%94%9F%E5%AD%98%E5%81%8F%E5%A5%BD
1、The documentation for "Placement Rules in SQL"(https://docs.pingcap.com/zh/tidb/stable/placement-rules-in-sql#placement-rules-in-sql)currently doesn‘t mention that “Placement Rules in SQL is incompatible with the location-labels configuration of PD and ignores this configuration” which is mentioned in another document (https://docs.pingcap.com/zh/tidb/stable/schedule-replicas-by-topology-labels#%E8%AE%BE%E7%BD%AE-pd-%E7%9A%84-location-labels-%E9%85%8D%E7%BD%AE), where it is simply stated that "SURVIVAL_PREFERENCES is equivalent to location-labels in PD." This may cause confusion for users.
It is recommended to provide a clear statement regarding this in the "Placement Rules in SQL" documentation.
2、Please evaluate whether it is feasible to have "Placement Rules in SQL" inherit the placement rules from PD location-labels by default.
Contributor guide
Assessment
This issue has not been assessed yet.