Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
- [#157](https://github.com/thanos-io/objstore/pull/157) Azure: Add `az_tenant_id`, `client_id` and `client_secret` configs.

### Fixed
- [#227](https://github.com/thanos-io/objstore/pull/227) OBS: Fix multipart upload error.
- [#196](https://github.com/thanos-io/objstore/pull/196) GCS: fix error check in Exists method when object does not exist.
- [#153](https://github.com/thanos-io/objstore/pull/153) Metrics: Fix `objstore_bucket_operation_duration_seconds_*` for `get` and `get_range` operations.
- [#141](https://github.com/thanos-io/objstore/pull/142) S3: Fix missing encryption configuration for `Bucket.Exists()` and `Bucket.Attributes()` calls.
Expand Down
6 changes: 3 additions & 3 deletions providers/obs/obs.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,17 @@ func (b *Bucket) multipartUpload(size int64, key, uploadId string, body io.Reade
parts := make([]obs.Part, 0, partSum)
for i := 1; i <= partSum; i++ {
partSize := PartSize
if i == partSum {
if i == partSum && lastPart > 0 {
partSize = lastPart
}
partReader := io.LimitReader(body, partSize)
output, err := b.client.UploadPart(&obs.UploadPartInput{
Bucket: b.name,
Key: key,
UploadId: uploadId,
Body: body,
Body: partReader,
PartNumber: i,
PartSize: partSize,
Offset: int64(i-1) * PartSize,
})
if err != nil {
return nil, errors.Wrap(err, "failed to multipart upload")
Expand Down
Loading