Skip to content

Bug fix: ingesters returning empty response #5081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* [BUGFIX] Fix panic when otel and xray tracing is enabled. #5044
* [BUGFIX] Fixed no compact block got grouped in shuffle sharding grouper. #5055
* [BUGFIX] Tracing: Fix missing object storage span instrumentation. #5074
* [BUGFIX] Ingester: Ingesters returning empty response for metadata APIs. #5081

## 1.14.0 2022-12-02

Expand Down
2 changes: 1 addition & 1 deletion pkg/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -2572,7 +2572,7 @@ func metadataQueryRange(queryStart, queryEnd int64, db *userTSDB, queryStoreForL
if queryIngestersWithin > 0 && queryStoreForLabels {
// If the feature for querying metadata from store-gateway is enabled,
// then we don't want to manipulate the mint and maxt.
return
return queryStart, queryEnd, nil
}

// Ingesters are run with limited retention and we don't support querying the store-gateway for labels yet.
Expand Down
8 changes: 5 additions & 3 deletions pkg/ingester/ingester_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1797,14 +1797,16 @@ func Test_Ingester_MetricsForLabelMatchers(t *testing.T) {
},
},
"should filter metrics by time range if queryStoreForLabels and queryIngestersWithin is enabled": {
from: 100,
to: 1000,
from: 99999,
to: 100001,
matchers: []*client.LabelMatchers{{
Matchers: []*client.LabelMatcher{
{Type: client.EQUAL, Name: model.MetricNameLabel, Value: "test_1"},
},
}},
expected: []*cortexpb.Metric{},
expected: []*cortexpb.Metric{
{Labels: cortexpb.FromLabelsToLabelAdapters(fixtures[0].lbls)},
},
queryStoreForLabels: true,
queryIngestersWithin: time.Hour,
},
Expand Down