bugfix: set default max_result_limit for search to 256*1024 (#6525)

This commit is contained in:
Xiaoguang Zhang
2026-02-22 00:55:26 -08:00
committed by Zach Kelling
parent 63f7159802
commit a1f9e76835
4 changed files with 18 additions and 2 deletions
+1
View File
@@ -1,5 +1,6 @@
## main / unreleased
* [CHANGE] Set default `max_result_limit` for search to 256*1024 [#6525](https://github.com/grafana/tempo/pull/6525) (@zhxiaogg)
* [CHANGE] **BREAKING CHANGE** Remove Opencensus receiver [#6523](https://github.com/grafana/tempo/pull/6523) (@javiermolinar)
* [CHANGE] Upgrade Tempo to Go 1.26.0 [#6443](https://github.com/grafana/tempo/pull/6443) (@stoewer)
* [CHANGE] Allow duplicate dimensions for span metrics and service graphs. This is a valid use case if using different instrumentation libraries, with spans having "deployment.environment" and others "deployment_environment", for example. [#6288](https://github.com/grafana/tempo/pull/6288) (@carles-grafana)
+1 -1
View File
@@ -397,7 +397,7 @@ query_frontend:
concurrent_jobs: 1000
target_bytes_per_job: 104857600
default_result_limit: 20
max_result_limit: 0
max_result_limit: 262144
max_duration: 168h0m0s
query_backend_after: 15m0s
ingester_shards: 3
+1 -1
View File
@@ -94,7 +94,7 @@ func (cfg *Config) RegisterFlagsAndApplyDefaults(string, *flag.FlagSet) {
Sharder: SearchSharderConfig{
QueryBackendAfter: 15 * time.Minute,
DefaultLimit: 20,
MaxLimit: 0,
MaxLimit: 256 * 1024,
MaxDuration: 168 * time.Hour, // 1 week
ConcurrentRequests: defaultConcurrentRequests,
TargetBytesPerRequest: defaultTargetBytesPerRequest,
+15
View File
@@ -0,0 +1,15 @@
package frontend
import (
"flag"
"testing"
"github.com/stretchr/testify/assert"
)
func TestSearchSharderConfigDefaults(t *testing.T) {
cfg := &Config{}
cfg.RegisterFlagsAndApplyDefaults("", &flag.FlagSet{})
assert.Equal(t, uint32(256*1024), cfg.Search.Sharder.MaxLimit)
}