Skip to content

Commit

Permalink
Sync:Fix concurrent error handling in multipart copy operation (#5044)
Browse files Browse the repository at this point in the history
  • Loading branch information
menwenjun authored Aug 1, 2024
1 parent 880a132 commit 5cf51ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/sync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,9 @@ func doCopyMultiple(src, dst object.ObjectStorage, key string, size int64, uploa
if num == n-1 {
sz = size - int64(num)*partSize
}
parts[num], err = doCopyRange(src, dst, key, int64(num)*partSize, sz, upload, num, abort)
errs <- err
var copyErr error
parts[num], copyErr = doCopyRange(src, dst, key, int64(num)*partSize, sz, upload, num, abort)
errs <- copyErr
}(i)
}

Expand Down

0 comments on commit 5cf51ad

Please sign in to comment.