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

Add Support for "Built In Placement Policies" #29677

Closed
Tracked by #18030
morgo opened this issue Nov 11, 2021 · 4 comments · Fixed by #47561
Closed
Tracked by #18030

Add Support for "Built In Placement Policies" #29677

morgo opened this issue Nov 11, 2021 · 4 comments · Fixed by #47561
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@morgo
Copy link
Contributor

morgo commented Nov 11, 2021

This subtask is to implement this part of the technical design doc:

Built-in Placement Policies

By default every system will have two placement policies, which can be modified via ALTER PLACEMENT POLICY but never dropped:

  • default: This policy is used only in the event that a policy has not been specified.
  • system: This policy is used for internal TiDB system tables.

Some common applications might be to increase the replica count on system or default tables. It is not typically recommended to add constraints to these policies as it will lead to cluster inbalance, but it is possible.

@nolouch
Copy link
Member

nolouch commented Nov 11, 2021

The scenario is custom deploy TiDB in three data center, the policy want to make the remote data center does not have a leader and is only used for backup purposes.

@lcwangchao
Copy link
Collaborator

Some behaviors should be discussed:

  • Should SHOW CREATE PLACEMENT POLICY ... be allowed for default or system policy. If it is allowed, what is the result if user have never set a custom default or system policy (no constraints)? SHOW PLACEMENTS also has the same problem.

  • If a default policy was set with some constraints. What should user do if he/she wants to place a table without any constraints.

@morgo morgo added the type/enhancement The issue or PR belongs to an enhancement. label Nov 12, 2021
@xhebox
Copy link
Contributor

xhebox commented Nov 15, 2021

  1. default is used to reset placement rules in the current design. It is conflicting with this behavior.
  2. For implementation, it is easy to create a policy applied to all regions. But you will need to exclude regions one by one, for example system tables.

@morgo
Copy link
Contributor Author

morgo commented Nov 30, 2021

I've removed this part of the plan from the technical design. We can re-evaluate it in this issue and potentially re-add it in future.

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.

4 participants