-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Enhancement
Currently, TiDB server cooperates with TiFlash cluster manager when adding TiFlash replica for tables. This strategy has many drawbacks:
- The whole process is driven by TiFlash cluster manager, which executes at long intervals. It takes a long time from
set tiflash replicaddl to TiFlash replica is available, especially when there are lots of small temporary tables. - TiFlash cluster manager need to pull all pd rules from pd server, pull all table infos from TiDB, and report sync status to every TiDB server, which costs lots of traffic.
- TiFlash cluster manager communicate by etcd, which is not a good practice
- For blocked ddl add partition, TiDB may create an unnecessary ddl job.
Therefore, we decide to move TiFlash cluster manager into TiDB server:
- TiDB now pull TiFlash's sync status directly in a status polling loop, instead of waiting for messages from TiFlash cluster manager.
- TiDB now set placement rule while executing ddl, instead of fetching, comparing and setting pd rules in status polling loop.
- Use ddl owner manager to manage leadership, instead of etcd in TiFlash cluster manager.
- Fix blocked ddl add partition problem.
This issue will be fixed in PR #29909
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.