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

Support checkpoint for ingest mode of adding index #42164

Closed
tangenta opened this issue Mar 13, 2023 · 0 comments · Fixed by #42769
Closed

Support checkpoint for ingest mode of adding index #42164

tangenta opened this issue Mar 13, 2023 · 0 comments · Fixed by #42769
Assignees
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@tangenta
Copy link
Contributor

Enhancement

Currently, TiDB doesn't support the checkpoint when using ingest mode for adding index. It means if TiDB is killed for upgrade or restart, the ongoing adding index progress is lost. This is obviously unacceptable for tasks that take a long time to complete.

The ingest mode is a better backfilling implementation introduced by TiDB v.6.3.0. TiDB uses the interface provided by tidb-lightning to write index data to the local storage, and imports the locally stored SST file. Since this implementation bypasses the transaction layer, it lacks the persistence provided by transactions. We need to implement checkpoint functions separately.

Here is the goal: for the same instance, the restarted TiDB can retain the adding index work progress and continue to execute.

Note that we don't support the resumption for the following cases:

  • In a distributed environment, TiDB hangs up and the task executor (DDL owner) changes.
  • The local temporary file is corrupted.
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
1 participant