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 drop database/table #800

Closed
4 tasks done
siddontang opened this issue Dec 25, 2015 · 0 comments
Closed
4 tasks done

DDL drop database/table #800

siddontang opened this issue Dec 25, 2015 · 0 comments
Assignees
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@siddontang
Copy link
Member

Now the DDL flow for drop database/table is public -> write only -> delete only -> delete all data -> absent.

If the data is very large, we may wait much time for this DDL. If the drop DDL enters delete only state, we can think all servers can't operate this database/table, and the newer database/table with same name will use another ID, so it is safe to enter absent state after delete only state.

And we will send a delete data task to a task list, a leader task runner get this task and do the delete work asynchronously in the backend.

We should save this task in a list like DDL job, so if the task runner down, another runner can re-handle this task again. (we can use DDL owner to handle this task directly.)

TODO:

  • implement a task list like DDL job list in meta
  • after delete only, save a delete task in task list, finish DDL.
  • DDL owner get the delete task and run it, remove it when finished.
  • show statistics can show current some delete task status.

@qiuyesuifeng , any to add?

@siddontang siddontang added the type/enhancement The issue or PR belongs to an enhancement. label Dec 25, 2015
@siddontang siddontang added this to the beta milestone Dec 25, 2015
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

No branches or pull requests

2 participants