Skip to content

Commit 7c798bc

Browse files
authored
Upload global marker before local (#4949)
Signed-off-by: Daniel Deluiggi <[email protected]> Signed-off-by: Daniel Deluiggi <[email protected]>
1 parent a1ca281 commit 7c798bc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
* [BUGFIX] QueryFrontend: fixed query_range requests when query has `start` equals to `end`. #4877
7373
* [BUGFIX] AlertManager: fixed issue introduced by #4495 where templates files were being deleted when using alertmanager local store. #4890
7474
* [BUGFIX] Ingester: fixed incorrect logging at the start of ingester block shipping logic. #4934
75+
* [BUGFIX] Storage/Bucket: fixed global mark missing on deletion. #4949
7576

7677
## 1.13.0 2022-07-14
7778

pkg/storage/tsdb/bucketindex/markers_bucket_client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ func (b *globalMarkersBucket) Upload(ctx context.Context, name string, r io.Read
3737
return err
3838
}
3939

40-
// Upload it to the original location.
41-
if err := b.parent.Upload(ctx, name, bytes.NewBuffer(body)); err != nil {
40+
// Upload it to the global marker's location.
41+
if err := b.parent.Upload(ctx, globalMarkPath, bytes.NewBuffer(body)); err != nil {
4242
return err
4343
}
4444

45-
// Upload it to the global markers location too.
46-
return b.parent.Upload(ctx, globalMarkPath, bytes.NewBuffer(body))
45+
// Upload it to the original location too.
46+
return b.parent.Upload(ctx, name, bytes.NewBuffer(body))
4747
}
4848

4949
// Delete implements objstore.Bucket.

0 commit comments

Comments
 (0)