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

lightning still fail at checksum stage when set checksum = "optional" #45382

Closed
lance6716 opened this issue Jul 17, 2023 · 1 comment · Fixed by #45486
Closed

lightning still fail at checksum stage when set checksum = "optional" #45382

lance6716 opened this issue Jul 17, 2023 · 1 comment · Fixed by #45486
Labels
affects-6.1 affects-6.5 affects-7.1 component/lightning This issue is related to Lightning of TiDB. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@lance6716
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

set checksum = "optional" in configuration file, and checksum meets error [tikv:9005]Region is unavailable

2. What did you expect to see? (Required)

lightning import task is passed

3. What did you see instead (Required)

lightning import task is failed

4. What is your TiDB version? (Required)

@lance6716 lance6716 added the type/bug The issue is confirmed as a bug. label Jul 17, 2023
@lance6716
Copy link
Contributor Author

remoteChecksum, err = DoChecksum(ctx, tr.tableInfo)
if err != nil {
return false, err
}
err = tr.compareChecksum(remoteChecksum, localChecksum)
// with post restore level 'optional', we will skip checksum error
if rc.cfg.PostRestore.Checksum == config.OpLevelOptional {
if err != nil {
tr.logger.Warn("compare checksum failed, will skip this error and go on", log.ShortError(err))
err = nil
}
}

We should let OpLevelOptional suppress the error of DoChecksum as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 affects-6.5 affects-7.1 component/lightning This issue is related to Lightning of TiDB. severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants