Skip to content

Commit b0aff72

Browse files
authored
[0.37-nov 19] (#106)
2 parents 457616e + 7a8a541 commit b0aff72

File tree

25 files changed

+400
-49
lines changed

25 files changed

+400
-49
lines changed

.mdox.validate.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ validators:
4747
# Expired certificate
4848
- regex: 'bestpractices\.coreinfrastructure\.org\/projects\/3048'
4949
type: 'ignore'
50+
# Frequent DNS issues.
51+
- regex: 'build\.thebeat\.co'
52+
type: 'ignore'

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
1212

1313
### Fixed
1414

15+
### Added
16+
17+
### Changed
18+
19+
### Removed
20+
21+
## [v0.37.0 - <in progress>](https://github.com/thanos-io/thanos/tree/release-0.37)
22+
23+
### Fixed
24+
1525
- [#7511](https://github.com/thanos-io/thanos/pull/7511) Query Frontend: fix doubled gzip compression for response body.
1626
- [#7592](https://github.com/thanos-io/thanos/pull/7592) Ruler: Only increment `thanos_rule_evaluation_with_warnings_total` metric for non PromQL warnings.
1727
- [#7614](https://github.com/thanos-io/thanos/pull/7614) *: fix debug log formatting.
@@ -26,6 +36,8 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
2636
- [#7852](https://github.com/thanos-io/thanos/pull/7852) Query Frontend: pass "stats" parameter forward to queriers and fix Prometheus stats merging.
2737
- [#7832](https://github.com/thanos-io/thanos/pull/7832) Query Frontend: Fix cache keys for dynamic split intervals.
2838
- [#7885](https://github.com/thanos-io/thanos/pull/7885) Store: Return chunks to the pool after completing a Series call.
39+
- [#7893](https://github.com/thanos-io/thanos/pull/7893) Sidecar: Fix retrieval of external labels for Prometheus v3.0.0.
40+
- [#7903](https://github.com/thanos-io/thanos/pull/7903) Query: Fix panic on regex store matchers.
2941

3042
### Added
3143
- [#7763](https://github.com/thanos-io/thanos/pull/7763) Ruler: use native histograms for client latency metrics.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.37.0-dev
1+
0.38.0-dev

cmd/thanos/main_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ func (b *erroringBucket) Name() string {
105105
return b.bkt.Name()
106106
}
107107

108+
// IterWithAttributes allows to iterate over objects in the bucket with their attributes.
109+
func (b *erroringBucket) IterWithAttributes(ctx context.Context, dir string, f func(objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
110+
return b.bkt.IterWithAttributes(ctx, dir, f, options...)
111+
}
112+
113+
// SupportedIterOptions returns the supported iteration options.
114+
func (b *erroringBucket) SupportedIterOptions() []objstore.IterOptionType {
115+
return b.bkt.SupportedIterOptions()
116+
}
117+
108118
// Ensures that downsampleBucket() stops its work properly
109119
// after an error occurs with some blocks in the backlog.
110120
// Testing for https://github.com/thanos-io/thanos/issues/4960.

cmd/thanos/store.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/prometheus/client_golang/prometheus"
2222
commonmodel "github.com/prometheus/common/model"
2323
"github.com/prometheus/common/route"
24+
"gopkg.in/yaml.v2"
2425

2526
"github.com/thanos-io/objstore"
2627
"github.com/thanos-io/objstore/client"
@@ -32,6 +33,7 @@ import (
3233
"github.com/thanos-io/thanos/pkg/block/metadata"
3334
"github.com/thanos-io/thanos/pkg/component"
3435
hidden "github.com/thanos-io/thanos/pkg/extflag"
36+
"github.com/thanos-io/thanos/pkg/exthttp"
3537
"github.com/thanos-io/thanos/pkg/extkingpin"
3638
"github.com/thanos-io/thanos/pkg/extprom"
3739
extpromhttp "github.com/thanos-io/thanos/pkg/extprom/http"
@@ -308,8 +310,11 @@ func runStore(
308310
if err != nil {
309311
return err
310312
}
311-
312-
bkt, err := client.NewBucket(logger, confContentYaml, conf.component.String(), nil)
313+
customBktConfig := exthttp.DefaultCustomBucketConfig()
314+
if err := yaml.Unmarshal(confContentYaml, &customBktConfig); err != nil {
315+
return errors.Wrap(err, "parsing config YAML file")
316+
}
317+
bkt, err := client.NewBucket(logger, confContentYaml, conf.component.String(), exthttp.CreateHedgedTransportWithConfig(customBktConfig))
313318
if err != nil {
314319
return err
315320
}

docs/components/receive.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ config:
113113
insecure_skip_verify: false
114114
disable_compression: false
115115
chunk_size_bytes: 0
116+
max_retries: 0
116117
prefix: ""
117118
```
118119

docs/components/sidecar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ config:
7575
insecure_skip_verify: false
7676
disable_compression: false
7777
chunk_size_bytes: 0
78+
max_retries: 0
7879
prefix: ""
7980
```
8081

docs/components/store.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ config:
3434
insecure_skip_verify: false
3535
disable_compression: false
3636
chunk_size_bytes: 0
37+
max_retries: 0
3738
prefix: ""
3839
```
3940

@@ -576,6 +577,33 @@ Note that there must be no trailing slash in the `peers` configuration i.e. one
576577

577578
If timeout is set to zero then there is no timeout for fetching and fetching's lifetime is equal to the lifetime to the original request's lifetime. It is recommended to keep it higher than zero. It is generally preferred to keep this value higher because the fetching operation potentially includes loading of data from remote object storage.
578579

580+
## Hedged Requests
581+
582+
Thanos Store Gateway supports `hedged requests` to enhance performance and reliability, particularly in high-latency environments. This feature addresses `long-tail latency issues` that can occur between the Thanos Store Gateway and an external cache, reducing the impact of slower response times on overall performance.
583+
584+
The configuration options for hedged requests allow for tuning based on latency tolerance and cost considerations, as some providers may charge per request.
585+
586+
In the `bucket.yml` file, you can specify the following fields under `hedging_config`:
587+
588+
- `enabled`: bool to enable hedged requests.
589+
- `up_to`: maximum number of hedged requests allowed for each initial request.
590+
- **Purpose**: controls the redundancy level of hedged requests to improve response times.
591+
- **Cost vs. Benefit**: increasing up_to can reduce latency but may increase costs, as some providers charge per request. Higher values provide diminishing returns on latency beyond a certain level.
592+
- `quantile`: latency threshold, specified as a quantile (e.g., percentile), which determines when additional hedged requests should be sent.
593+
- **Purpose**: controls when hedged requests are triggered based on response time distribution.
594+
- **Cost vs. Benefit**: lower quantile (e.g., 0.7) initiates hedged requests sooner, potentially raising costs while lowering latency variance. A higher quantile (e.g., 0.95) will initiate hedged requests later, reducing cost by limiting redundancy.
595+
596+
By default, `hedging_config` is set as follows:
597+
598+
```yaml
599+
hedging_config:
600+
enabled: false
601+
up_to: 3
602+
quantile: 0.9
603+
```
604+
605+
This configuration sends up to three additional requests if the initial request response time exceeds the 90th percentile.
606+
579607
## Index Header
580608

581609
In order to query series inside blocks from object storage, Store Gateway has to know certain initial info from each block index. In order to achieve so, on startup the Gateway builds an `index-header` for each block and stores it on local disk; such `index-header` is build by downloading specific pieces of original block's index, stored on local disk and then mmaped and used by Store Gateway.

docs/components/tools.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ config:
129129
insecure_skip_verify: false
130130
disable_compression: false
131131
chunk_size_bytes: 0
132+
max_retries: 0
132133
prefix: ""
133134
```
134135

@@ -700,6 +701,7 @@ config:
700701
insecure_skip_verify: false
701702
disable_compression: false
702703
chunk_size_bytes: 0
704+
max_retries: 0
703705
prefix: ""
704706
```
705707

@@ -803,6 +805,7 @@ config:
803805
insecure_skip_verify: false
804806
disable_compression: false
805807
chunk_size_bytes: 0
808+
max_retries: 0
806809
prefix: ""
807810
```
808811

docs/storage.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ config:
103103
kms_encryption_context: {}
104104
encryption_key: ""
105105
sts_endpoint: ""
106+
max_retries: 0
106107
prefix: ""
107108
```
108109

@@ -305,6 +306,7 @@ config:
305306
insecure_skip_verify: false
306307
disable_compression: false
307308
chunk_size_bytes: 0
309+
max_retries: 0
308310
prefix: ""
309311
```
310312

@@ -495,6 +497,7 @@ config:
495497
endpoint: ""
496498
secret_key: ""
497499
secret_id: ""
500+
max_retries: 0
498501
http_config:
499502
idle_conn_timeout: 1m30s
500503
response_header_timeout: 2m

0 commit comments

Comments
 (0)