mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-31 07:30:49 -08:00
Merge pull request #8994 from darshanime/federate_dup_fix
Ask querier for sorted series in /federate
This commit is contained in:
commit
67fae26b29
|
@ -95,7 +95,7 @@ func (h *Handler) federation(w http.ResponseWriter, req *http.Request) {
|
||||||
|
|
||||||
var sets []storage.SeriesSet
|
var sets []storage.SeriesSet
|
||||||
for _, mset := range matcherSets {
|
for _, mset := range matcherSets {
|
||||||
s := q.Select(false, hints, mset...)
|
s := q.Select(true, hints, mset...)
|
||||||
sets = append(sets, s)
|
sets = append(sets, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,14 @@ test_metric1{foo="bar",instance="i"} 10000 6000000
|
||||||
test_metric1{foo="boo",instance="i"} 1 6000000
|
test_metric1{foo="boo",instance="i"} 1 6000000
|
||||||
# TYPE test_metric2 untyped
|
# TYPE test_metric2 untyped
|
||||||
test_metric2{foo="boo",instance="i"} 1 6000000
|
test_metric2{foo="boo",instance="i"} 1 6000000
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
"two matchers with overlap": {
|
||||||
|
params: "match[]={__name__=~'test_metric1'}&match[]={foo='bar'}",
|
||||||
|
code: 200,
|
||||||
|
body: `# TYPE test_metric1 untyped
|
||||||
|
test_metric1{foo="bar",instance="i"} 10000 6000000
|
||||||
|
test_metric1{foo="boo",instance="i"} 1 6000000
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
"everything": {
|
"everything": {
|
||||||
|
|
Loading…
Reference in a new issue