Skip to content

Commit 9ce6b64

Browse files
Merge remote-tracking branch 'origin/release-0.15' into qyerying-dedup-penalty-with-res-step
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
2 parents 3adbe02 + 7d7d176 commit 9ce6b64

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ We use *breaking :warning:* word for marking changes that are not backward compa
1515

1616
* [#3095](https://github.com/thanos-io/thanos/pull/3095) Rule: update manager when all rule files are removed.
1717
* [#3098](https://github.com/thanos-io/thanos/pull/3098) ui: Fix Block Viewer for Compactor and Store
18+
* [#3105](https://github.com/thanos-io/thanos/pull/3105) Query: Fix overwriting maxSourceResolution when auto downsampling is enabled.
1819
* [#3010](https://github.com/thanos-io/thanos/pull/3010) Querier: Added a flag to override the default look back delta in promql. The flag should be set to at least 2 times the slowest scrape interval.
1920

20-
2121
## [v0.15.0-rc.0](https://github.com/thanos-io/thanos/releases/tag/v0.15.0-rc.0) - 2020.08.26
2222

2323
Highlights:

pkg/api/query/v1.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ func (qapi *QueryAPI) parseDownsamplingParamMillis(r *http.Request, defaultVal t
195195
val := r.FormValue(maxSourceResolutionParam)
196196
if qapi.enableAutodownsampling || (val == "auto") {
197197
maxSourceResolution = defaultVal
198-
} else if val != "" {
198+
}
199+
if val != "" && val != "auto" {
199200
var err error
200201
maxSourceResolution, err = parseDuration(val)
201202
if err != nil {

pkg/api/query/v1_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,14 @@ func TestParseDownsamplingParamMillis(t *testing.T) {
10401040
result: int64((1 * time.Hour) / 6),
10411041
fail: true,
10421042
},
1043+
// maxSourceResolution param can be overwritten.
1044+
{
1045+
maxSourceResolutionParam: "1m",
1046+
enableAutodownsampling: true,
1047+
step: time.Hour,
1048+
result: int64(time.Minute / (1000 * 1000)),
1049+
fail: false,
1050+
},
10431051
}
10441052

10451053
for i, test := range tests {

0 commit comments

Comments
 (0)