Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddl: Move TiFlash cluster manager module into TiDB #29924

Closed
CalvinNeo opened this issue Nov 18, 2021 · 1 comment
Closed

ddl: Move TiFlash cluster manager module into TiDB #29924

CalvinNeo opened this issue Nov 18, 2021 · 1 comment
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@CalvinNeo
Copy link
Member

CalvinNeo commented Nov 18, 2021

Enhancement

Currently, TiDB server cooperates with TiFlash cluster manager when adding TiFlash replica for tables. This strategy has many drawbacks:

  1. The whole process is driven by TiFlash cluster manager, which executes at long intervals. It takes a long time from set tiflash replica ddl to TiFlash replica is available, especially when there are lots of small temporary tables.
  2. 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.
  3. TiFlash cluster manager communicate by etcd, which is not a good practice
  4. For blocked ddl add partition, TiDB may create an unnecessary ddl job.

Therefore, we decide to move TiFlash cluster manager into TiDB server:

  1. TiDB now pull TiFlash's sync status directly in a status polling loop, instead of waiting for messages from TiFlash cluster manager.
  2. TiDB now set placement rule while executing ddl, instead of fetching, comparing and setting pd rules in status polling loop.
  3. Use ddl owner manager to manage leadership, instead of etcd in TiFlash cluster manager.
  4. Fix blocked ddl add partition problem.

This issue will be fixed in PR #29909

@CalvinNeo
Copy link
Member Author

A basic version is finished, with some enhancement will be introduced in #32254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant