Skip to content

Commit

Permalink
lightning: fixed panic when DoChecksum returned error (#27596) (#27686)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-srebot authored Oct 13, 2021
1 parent 5f8ffd3 commit 5302a51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions br/pkg/lightning/restore/table_restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,9 @@ func (tr *TableRestore) postProcess(
}

remoteChecksum, err := DoChecksum(ctx, tr.tableInfo)
if err != nil {
return false, err
}
// TODO: If there are duplicate keys, do not set the `ChecksumMismatch` error
err = tr.compareChecksum(remoteChecksum, localChecksum)
// with post restore level 'optional', we will skip checksum error
Expand Down

0 comments on commit 5302a51

Please sign in to comment.