Skip to content

Commit

Permalink
dupdetect: gRPC cancel should trigger retry (#58542)
Browse files Browse the repository at this point in the history
close #58523
  • Loading branch information
lance6716 authored Jan 6, 2025
1 parent 7063a6f commit 88a2247
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/lightning/backend/local/duplicate.go
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,9 @@ func (m *dupeDetector) processRemoteDupTask(
}
return nil
}
if log.IsContextCanceledError(err) {
return errors.Trace(err)
if err2 := ctx.Err(); err2 != nil {
// stop retry when user cancel the context
return errors.Trace(err2)
}
if !madeProgress {
_, isRegionErr := errors.Cause(err).(regionError)
Expand Down

0 comments on commit 88a2247

Please sign in to comment.