Skip to content

Upload global marker before local #4949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2022
Merged
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 @@ -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

Expand Down
8 changes: 4 additions & 4 deletions pkg/storage/tsdb/bucketindex/markers_bucket_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down