Skip to content

Commit

Permalink
Merge branch 'main' into mhoffm-proxy-heap-sorting-issue-2
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaHoffmann authored Sep 12, 2023
2 parents 832ac03 + 2ec9b0c commit 16439df
Show file tree
Hide file tree
Showing 3 changed files with 710 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
- [#6592](https://github.com/thanos-io/thanos/pull/6592) Query Frontend: fix bugs in vertical sharding `without` and `union` function to allow more queries to be shardable.
- [#6317](https://github.com/thanos-io/thanos/pull/6317) *: Fix internal label deduplication bug, by resorting store response set.
- [#6189](https://github.com/thanos-io/thanos/pull/6189) Rule: Fix panic when calling API `/api/v1/rules?type=alert`.
- [#6598](https://github.com/thanos-io/thanos/pull/6598) compact: fix data corruption with "invalid size" error during downsample

### Changed
- [#6049](https://github.com/thanos-io/thanos/pull/6049) Compact: *breaking :warning:* Replace group with resolution in compact metrics to avoid cardinality explosion on compact metrics for large numbers of groups.
Expand Down
11 changes: 10 additions & 1 deletion pkg/compact/downsample/downsample.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,17 @@ func downsampleRawLoop(data []sample, resolution int64, numChunks int) []chunks.
for ; j < len(data) && data[j].t <= curW; j++ {
}

batch := data[:j]
batch := make([]sample, 0, j)
for _, s := range data[:j] {
if math.IsNaN(s.v) {
continue
}
batch = append(batch, s)
}
data = data[j:]
if len(batch) == 0 {
continue
}

ab := newAggrChunkBuilder()

Expand Down
Loading

0 comments on commit 16439df

Please sign in to comment.