Open ilovesoup opened 3 years ago
PD show Error Failed to set config: [400] "cannot update LocationLabels when placement rules feature is enabled, please update rule instead"
if set location labels by pd-ctrl directly.
To use location labels for tiflash, we should follow these steps:
tiflash node 1
[server.labels]
zone = "z1"
tiflash node 2 [server.labels] zone = "z2"
tiflash node 3 [server.labels] zone = "z1"
- Use ddl `ALTER TABLE table_name SET TIFLASH REPLICA count LOCATION LABELS location_labels` like `alter table test.orders set tiflash replica 2 location labels "zone"`.
- Finally, PD will reschedule region peer and region count of each tiflash store will be like
tiflash node 1 region_count: 14
tiflash node 2 region_count: 28
tiflash node 3 region_count: 14
https://docs.google.com/document/d/1mWQLS7iSrGPXNuBERaOMB_FuL92LUZfkB2Zi3WWFBtY
/assign @ilovesoup
Feature Request
TiFlash currently does not support location awareness. According to TiKV, it support PD schedule aware of location label reported and avoid schedule replicas of same region to the same location (node, rack or DC). Although TiFlash support single instance multiple disks but it still need rack and DC awareness.
Describe the feature you'd like: Just like in TiKV, TiFlash should use the same label rules to config and report to PD, and PD should follow the same rules to schedule replicas.