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

Update Dumpling Behavior to not dump policies by default #31760

Closed
Tracked by #18030
morgo opened this issue Jan 18, 2022 · 1 comment
Closed
Tracked by #18030

Update Dumpling Behavior to not dump policies by default #31760

morgo opened this issue Jan 18, 2022 · 1 comment
Labels
component/dumpling This is related to Dumpling of TiDB.

Comments

@morgo
Copy link
Contributor

morgo commented Jan 18, 2022

In a call with the tools team, we discussed the current dumpling behavior of automatically dumping placement policies in dumpling backups. Because dumpling is a logical backup tool and is often used to restore to a destination which has a different physical layout, we agreed to change this. The new behavior will be:

  • Dumping placement policies is disabled by default.
  • A new option will be added to dumpling which will dump placement policies (TBD). Whether it dumps all placement policies or referenced tables is TBD.
  • When the option is enabled, all placement policies will be dumped with CREATE OR REPLACE PLACEMENT POLICY syntax.

This doesn't affect the SHOW CREATE TABLE output which will include the placement policies in the table name. The restore will still need to enable tidb_placement_mode='IGNORE' for a safe restore if the policies don't exist.

@glorv glorv added the component/dumpling This is related to Dumpling of TiDB. label Jan 20, 2022
@lcwangchao
Copy link
Collaborator

lcwangchao commented Mar 4, 2022

It seems that there are no more development works. The current behavior is:

  1. Always dump placement policies with annotation format.
  2. The placement sql will be dumped as CREATE PLACEMENT POLICY ... without "OR REPLACE" to stay the same with databases and tables. (The lightning will add the 'or replace' clause when importing it)

The above behavior can satisfy the current requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/dumpling This is related to Dumpling of TiDB.
Projects
None yet
Development

No branches or pull requests

3 participants