Skip to content

Commit

Permalink
Adding Commentts
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Protasio <approtas@amazon.com>
  • Loading branch information
alanprot committed Jul 11, 2022
1 parent 472610e commit 0a4ffb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
- [#5440](https://github.com/thanos-io/thanos/pull/5440) HTTP metrics: export number of in-flight HTTP requests.
- [#5424](https://github.com/thanos-io/thanos/pull/5424) Receive: Export metrics regarding size of remote write requests.
- [#5420](https://github.com/thanos-io/thanos/pull/5420) Receive: Automatically remove stale tenants.
- [#5475](https://github.com/thanos-io/thanos/pull/5475) Compact/Store: Added `--block-files-concurrency` allowing to configure number of go routines for upload/download block files during compaction.
- [#5472](https://github.com/thanos-io/thanos/pull/5472) Receive: add new tenant metrics to example dashboard.
- [#5475](https://github.com/thanos-io/thanos/pull/5475) Compact/Store: Added `--block-files-concurrency` allowing to configure number of go routines for download/upload block files during compaction.

### Changed

Expand Down
5 changes: 5 additions & 0 deletions pkg/objstore/objstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ func NopCloserWithSize(r io.Reader) io.ReadCloser {
func UploadDir(ctx context.Context, logger log.Logger, bkt Bucket, srcdir, dstdir string, options ...UploadOption) error {
df, err := os.Stat(srcdir)
opts := applyUploadOptions(options...)

// The derived Context is canceled the first time a function passed to Go returns a non-nil error or the first
// time Wait returns, whichever occurs first.
g, ctx := errgroup.WithContext(ctx)
g.SetLimit(opts.concurrency)

Expand Down Expand Up @@ -334,6 +337,8 @@ func DownloadDir(ctx context.Context, logger log.Logger, bkt BucketReader, origi
}
opts := applyDownloadOptions(options...)

// The derived Context is canceled the first time a function passed to Go returns a non-nil error or the first
// time Wait returns, whichever occurs first.
g, ctx := errgroup.WithContext(ctx)
g.SetLimit(opts.concurrency)

Expand Down

0 comments on commit 0a4ffb1

Please sign in to comment.