Skip to content

Commit

Permalink
fix(s3): disable client retries when congestion control is enabled (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwanthgoli authored Oct 24, 2024
1 parent f0a8564 commit cff9f43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 0 additions & 7 deletions docs/sources/shared/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5650,13 +5650,6 @@ congestion_control:
# CLI flag: -store.max-parallel-get-chunk
[max_parallel_get_chunk: <int> | default = 150]

# Enables the use of thanos-io/objstore clients for connecting to object
# storage. When set to true, the configuration inside
# `storage_config.object_store` or `common.storage.object_store` block takes
# effect.
# CLI flag: -use-thanos-objstore
[use_thanos_objstore: <boolean> | default = false]

# The maximum number of chunks to fetch per batch.
# CLI flag: -store.max-chunk-batch-size
[max_chunk_batch_size: <int> | default = 50]
Expand Down
6 changes: 5 additions & 1 deletion pkg/storage/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ type Config struct {
DisableBroadIndexQueries bool `yaml:"disable_broad_index_queries"`
MaxParallelGetChunk int `yaml:"max_parallel_get_chunk"`

UseThanosObjstore bool `yaml:"use_thanos_objstore" doc:"hidden`
UseThanosObjstore bool `yaml:"use_thanos_objstore" doc:"hidden"`
ObjectStore bucket.Config `yaml:"object_store" doc:"hidden"`

MaxChunkBatchSize int `yaml:"max_chunk_batch_size"`
Expand Down Expand Up @@ -650,6 +650,10 @@ func internalNewObjectClient(storeName, component string, cfg Config, clientMetr
}
s3Cfg = awsCfg.S3Config
}

if cfg.CongestionControl.Enabled {
s3Cfg.BackoffConfig.MaxRetries = 1
}
return aws.NewS3ObjectClient(s3Cfg, cfg.Hedging)

case types.StorageTypeAlibabaCloud:
Expand Down

0 comments on commit cff9f43

Please sign in to comment.