Skip to content

Commit

Permalink
Changed S3Storage to report context.Cancelled if cancelWrites was called
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Moore <[email protected]>
  • Loading branch information
jimmyaxod committed Oct 23, 2024
1 parent 71cb781 commit b08f9e3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/storage/sources/s3_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,7 @@ func (i *S3Storage) WriteAt(buffer []byte, offset int64) (int, error) {
atomic.AddUint64(&i.metrics_blocks_w_bytes, uint64(obj.Size))
atomic.AddUint64(&i.metrics_blocks_w_time_ns, uint64(dtime.Nanoseconds()))
} else {
// Currently, if the context was canceled, we ignore it.
if !errors.Is(err, context.Canceled) {
return 0, err
}
return 0, err
}

return int(obj.Size), nil
Expand Down

0 comments on commit b08f9e3

Please sign in to comment.