Skip to content

Commit

Permalink
Merge pull request #7815 from fpetkovski/disable-chunk-trimming
Browse files Browse the repository at this point in the history
Disable chunk trimming in Receivers
  • Loading branch information
fpetkovski authored Oct 14, 2024
2 parents d215f5b + a79c710 commit 2f39d24
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/components/receive.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ config:
server_name: ""
insecure_skip_verify: false
disable_compression: false
chunk_size_bytes: 0
prefix: ""
```

Expand Down
1 change: 1 addition & 0 deletions docs/components/sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ config:
server_name: ""
insecure_skip_verify: false
disable_compression: false
chunk_size_bytes: 0
prefix: ""
```

Expand Down
1 change: 1 addition & 0 deletions docs/components/store.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ config:
server_name: ""
insecure_skip_verify: false
disable_compression: false
chunk_size_bytes: 0
prefix: ""
```

Expand Down
3 changes: 3 additions & 0 deletions docs/components/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ config:
server_name: ""
insecure_skip_verify: false
disable_compression: false
chunk_size_bytes: 0
prefix: ""
```

Expand Down Expand Up @@ -698,6 +699,7 @@ config:
server_name: ""
insecure_skip_verify: false
disable_compression: false
chunk_size_bytes: 0
prefix: ""
```

Expand Down Expand Up @@ -800,6 +802,7 @@ config:
server_name: ""
insecure_skip_verify: false
disable_compression: false
chunk_size_bytes: 0
prefix: ""
```

Expand Down
1 change: 1 addition & 0 deletions docs/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ config:
server_name: ""
insecure_skip_verify: false
disable_compression: false
chunk_size_bytes: 0
prefix: ""
```

Expand Down
6 changes: 6 additions & 0 deletions pkg/store/storepb/rpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/store/storepb/rpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ service Store {
///
/// There is no requirements on chunk sorting, however it is recommended to have chunk sorted by chunk min time.
/// This heavily optimizes the resource usage on Querier / Federated Queries.
///
/// Chunks can span a range larger than the requested min and max time and it is up to the query engine to discard samples
/// which fall outside of the query range.
rpc Series(SeriesRequest) returns (stream SeriesResponse);

/// LabelNames returns all label names constrained by the given matchers.
Expand Down
7 changes: 4 additions & 3 deletions pkg/store/tsdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,10 @@ func (s *TSDBStore) Series(r *storepb.SeriesRequest, seriesSrv storepb.Store_Ser
}

hints := &storage.SelectHints{
Start: r.MinTime,
End: r.MaxTime,
Limit: int(r.Limit),
Start: r.MinTime,
End: r.MaxTime,
Limit: int(r.Limit),
DisableTrimming: true,
}
set := q.Select(srv.Context(), true, hints, matchers...)

Expand Down
2 changes: 1 addition & 1 deletion pkg/store/tsdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func TestTSDBStore_Series(t *testing.T) {
expectedSeries: []rawSeries{
{
lset: labels.FromStrings("a", "1", "region", "eu-west"),
chunks: [][]sample{{{1, 1}, {2, 2}}},
chunks: [][]sample{{{1, 1}, {2, 2}, {3, 3}}},
},
},
},
Expand Down

0 comments on commit 2f39d24

Please sign in to comment.