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

Dropping the placement rules when the table is dropped #18206

Closed
Tracked by #18030
djshow832 opened this issue Jun 24, 2020 · 1 comment
Closed
Tracked by #18030

Dropping the placement rules when the table is dropped #18206

djshow832 opened this issue Jun 24, 2020 · 1 comment
Labels
sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement. type/usability

Comments

@djshow832
Copy link
Contributor

Development Task

Background

It's a part of project "Placement rules in SQL". It should accomplished after adding placement rules (#18200).

When dropping a table, the placement rules on it should also be dropped. But it's not straightforward: the table might be recovered later, through FLASHBACK or RECOVER statements. Once it's recovered, the placement rules on it should also be recovered. So the placement rules can't be dropped immediately.

Solutions

The most straightforward solution is to create a goroutine to check the table periodically. Once the table can't be recovered, notify PD to drop its placement rules. Once the table is recovered, stop the goroutine.

But note that TiDB may shutdown anytime, so the information should be persisted in TiKV and the goroutine should be always running.

@morgo
Copy link
Contributor

morgo commented Jul 29, 2021

This should have been fixed by #20622. We can reopen if that's not the case.

@morgo morgo closed this as completed Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement. type/usability
Projects
None yet
Development

No branches or pull requests

3 participants