Skip to content

Commit bfc940a

Browse files
committed
lightning: make OpLevelOptional suppress the error of DoChecksum
1 parent 45bb013 commit bfc940a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

br/pkg/lightning/importer/table_import.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,13 +1041,12 @@ func (tr *TableImporter) postProcess(
10411041
remoteChecksum = nil
10421042
err = status.Error(codes.Unknown, "Checksum meets error.")
10431043
})
1044-
if rc.cfg.PostRestore.Checksum == config.OpLevelOptional {
1045-
if err != nil {
1044+
if err != nil {
1045+
if rc.cfg.PostRestore.Checksum == config.OpLevelOptional {
10461046
tr.logger.Warn("do checksum failed, will skip this error and go on", log.ShortError(err))
10471047
err = nil
10481048
}
1049-
}
1050-
if err != nil {
1049+
} else {
10511050
return false, err
10521051
}
10531052
if remoteChecksum != nil {

0 commit comments

Comments
 (0)