diff --git a/CHANGELOG.md b/CHANGELOG.md index 368a385fa4e..e3a0806d859 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,7 @@ * [BUGFIX] QueryFrontend: fixed query_range requests when query has `start` equals to `end`. #4877 * [BUGFIX] AlertManager: fixed issue introduced by #4495 where templates files were being deleted when using alertmanager local store. #4890 * [BUGFIX] Ingester: fixed incorrect logging at the start of ingester block shipping logic. #4934 +* [BUGFIX] Storage/Bucket: fixed global mark missing on deletion. #4949 ## 1.13.0 2022-07-14 diff --git a/pkg/storage/tsdb/bucketindex/markers_bucket_client.go b/pkg/storage/tsdb/bucketindex/markers_bucket_client.go index 4858e3e2c0b..e175f10f90b 100644 --- a/pkg/storage/tsdb/bucketindex/markers_bucket_client.go +++ b/pkg/storage/tsdb/bucketindex/markers_bucket_client.go @@ -37,13 +37,13 @@ func (b *globalMarkersBucket) Upload(ctx context.Context, name string, r io.Read return err } - // Upload it to the original location. - if err := b.parent.Upload(ctx, name, bytes.NewBuffer(body)); err != nil { + // Upload it to the global marker's location. + if err := b.parent.Upload(ctx, globalMarkPath, bytes.NewBuffer(body)); err != nil { return err } - // Upload it to the global markers location too. - return b.parent.Upload(ctx, globalMarkPath, bytes.NewBuffer(body)) + // Upload it to the original location too. + return b.parent.Upload(ctx, name, bytes.NewBuffer(body)) } // Delete implements objstore.Bucket.