Skip to content

Commit

Permalink
restore: fix typo (pingcap#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm authored May 11, 2020
1 parent 8153e31 commit f3ce13e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lightning/restore/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ func (rc *RestoreController) restoreTables(ctx context.Context) error {
for tableName, status := range allInvalidCheckpoints {
failedStep := status * 10
var action strings.Builder
action.WriteString("./tidb-lightning-ctl --checkpoint-errors-")
action.WriteString("./tidb-lightning-ctl --checkpoint-error-")
switch failedStep {
case CheckpointStatusAlteredAutoInc, CheckpointStatusAnalyzed:
action.WriteString("ignore")
Expand All @@ -661,7 +661,7 @@ func (rc *RestoreController) restoreTables(ctx context.Context) error {
)
}

logger.Info("You may also run `./tidb-lightning-ctl --checkpoint-errors-destroy=all --config=...` to start from scratch")
logger.Info("You may also run `./tidb-lightning-ctl --checkpoint-error-destroy=all --config=...` to start from scratch")
logger.Info("For details of this failure, read the log file from the PREVIOUS run")

return errors.New("TiDB Lightning has failed last time; please resolve these errors first")
Expand Down
6 changes: 3 additions & 3 deletions tests/error_summary/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ set -e

tail -20 "$TEST_DIR/lightning-error-summary.log" > "$TEST_DIR/lightning-error-summary.tail"
grep -Fq '["TiDB Lightning has failed last time. To prevent data loss, this run will stop now. Please resolve errors first"] [count=2]' "$TEST_DIR/lightning-error-summary.tail"
grep -Fq '[-] [table=`error_summary`.`a`] [status=18] [failedStep=checksum] [recommendedAction="./tidb-lightning-ctl --checkpoint-errors-destroy='"'"'`error_summary`.`a`'"'"' --config=..."]' "$TEST_DIR/lightning-error-summary.tail"
grep -Fq '[-] [table=`error_summary`.`c`] [status=18] [failedStep=checksum] [recommendedAction="./tidb-lightning-ctl --checkpoint-errors-destroy='"'"'`error_summary`.`c`'"'"' --config=..."]' "$TEST_DIR/lightning-error-summary.tail"
grep -Fq '[-] [table=`error_summary`.`a`] [status=18] [failedStep=checksum] [recommendedAction="./tidb-lightning-ctl --checkpoint-error-destroy='"'"'`error_summary`.`a`'"'"' --config=..."]' "$TEST_DIR/lightning-error-summary.tail"
grep -Fq '[-] [table=`error_summary`.`c`] [status=18] [failedStep=checksum] [recommendedAction="./tidb-lightning-ctl --checkpoint-error-destroy='"'"'`error_summary`.`c`'"'"' --config=..."]' "$TEST_DIR/lightning-error-summary.tail"
! grep -Fq '[-] [table=`error_summary`.`b`] [status=18] [failedStep=checksum]' "$TEST_DIR/lightning-error-summary.tail"
grep -Fq '["You may also run `./tidb-lightning-ctl --checkpoint-errors-destroy=all --config=...` to start from scratch"]' "$TEST_DIR/lightning-error-summary.tail"
grep -Fq '["You may also run `./tidb-lightning-ctl --checkpoint-error-destroy=all --config=...` to start from scratch"]' "$TEST_DIR/lightning-error-summary.tail"
grep -Fq '["For details of this failure, read the log file from the PREVIOUS run"]' "$TEST_DIR/lightning-error-summary.tail"

0 comments on commit f3ce13e

Please sign in to comment.