Skip to content
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

store: add custom_config field #7934

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
9 changes: 6 additions & 3 deletions cmd/thanos/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,14 @@ func runStore(
if err != nil {
return err
}
customBktConfig := exthttp.DefaultCustomBucketConfig()
if err := yaml.Unmarshal(confContentYaml, &customBktConfig); err != nil {
var customConfig struct {
customBktConfig exthttp.CustomBucketConfig `yaml:"custom_config"`
}
customConfig.customBktConfig = exthttp.DefaultCustomBucketConfig()
if err := yaml.Unmarshal(confContentYaml, &customConfig); err != nil {
return errors.Wrap(err, "parsing config YAML file")
}
bkt, err := client.NewBucket(logger, confContentYaml, conf.component.String(), exthttp.CreateHedgedTransportWithConfig(customBktConfig))
bkt, err := client.NewBucket(logger, confContentYaml, conf.component.String(), exthttp.CreateHedgedTransportWithConfig(customConfig.customBktConfig))
if err != nil {
return err
}
Expand Down
5 changes: 5 additions & 0 deletions docs/components/store.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ config:
chunk_size_bytes: 0
max_retries: 0
prefix: ""
custom_config:
hedging_config:
enabled: false
up_to: 0
quantile: 0
```

In general, an average of 6 MB of local disk space is required per TSDB block stored in the object storage bucket, but for high cardinality blocks with large label set it can even go up to 30MB and more. It is for the pre-computed index, which includes symbols and postings offsets as well as metadata JSON.
Expand Down
Loading