If you are using Importer-backend, depending on the status of tikv-importer
, the basic sequence of restarting TiDB Lightning is like this:
If tikv-importer
is still running:
-
Stop
tidb-lightning
. - Perform the intended modifications, such as fixing the source data, changing settings, replacing hardware etc.
- If the modification previously has changed any table, remove the corresponding checkpoint too.
- Start
tidb-lightning
.
If tikv-importer
needs to be restarted:
-
Stop
tidb-lightning
. -
Stop
tikv-importer
. - Perform the intended modifications, such as fixing the source data, changing settings, replacing hardware etc.
- Start
tikv-importer
. - Start
tidb-lightning
and wait until the program fails with CHECKSUM error, if any.- Restarting
tikv-importer
would destroy all engine files still being written, buttidb-lightning
did not know about it. As of v3.0 the simplest way is to lettidb-lightning
go on and retry.
- Restarting
- Destroy the failed tables and checkpoints
- Start
tidb-lightning
again.
If you are using Local-backend or TiDB-backend, the operations are the same as those of using Importer-backend when the tikv-importer
is still running.