Skip to content

Commit 76ca69d

Browse files
authored
cleanup docs for query_store_for_labels_enabled config (#6156)
* cleanup docs for query_store_for_labels_enabled config Signed-off-by: Ben Ye <[email protected]> * update doc and mention the release Signed-off-by: Ben Ye <[email protected]> --------- Signed-off-by: Ben Ye <[email protected]>
1 parent ee8f8e9 commit 76ca69d

File tree

5 files changed

+4
-13
lines changed

5 files changed

+4
-13
lines changed

docs/api/_index.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,7 @@ GET,POST <prometheus-http-prefix>/api/v1/series
355355
GET,POST <legacy-http-prefix>/api/v1/series
356356
```
357357

358-
Find series by label matchers. Differently than Prometheus and due to scalability and performances reasons, if `-querier.query-store-for-labels-enabled` is not set or if `start` param is not specified, Cortex currently always fetches series from data stored in the ingesters.
359-
360-
If `-querier.query-store-for-labels-enabled` is configured, Cortex also queries the long-term store with the *blocks* storage engine.
358+
Find series by label matchers. Starting from release v1.18.0, Cortex by default honors the `start` and `end` request parameters and fetches series from either ingester, store gateway or both. The special case is that if `start` param is not specified, Cortex currently fetches series from data stored in the ingesters.
361359

362360
_For more information, please check out the Prometheus [series endpoint](https://prometheus.io/docs/prometheus/latest/querying/api/#finding-series-by-label-matchers) documentation._
363361

@@ -372,7 +370,7 @@ GET,POST <prometheus-http-prefix>/api/v1/labels
372370
GET,POST <legacy-http-prefix>/api/v1/labels
373371
```
374372

375-
Get label names of ingested series. Differently than Prometheus and due to scalability and performances reasons, Cortex currently ignores the `start` and `end` request parameters and always fetches the label names from in-memory data stored in the ingesters. There is experimental support to query the long-term store with the *blocks* storage engine when `-querier.query-store-for-labels-enabled` is set.
373+
Get label names of ingested series. Starting from release v1.18.0, Cortex by default honors the `start` and `end` request parameters and fetches label names from either ingester, store gateway or both.
376374

377375
_For more information, please check out the Prometheus [get label names](https://prometheus.io/docs/prometheus/latest/querying/api/#getting-label-names) documentation._
378376

@@ -387,7 +385,7 @@ GET <prometheus-http-prefix>/api/v1/label/{name}/values
387385
GET <legacy-http-prefix>/api/v1/label/{name}/values
388386
```
389387

390-
Get label values for a given label name. Differently than Prometheus and due to scalability and performances reasons, Cortex currently ignores the `start` and `end` request parameters and always fetches the label values from in-memory data stored in the ingesters. There is experimental support to query the long-term store with the *blocks* storage engine when `-querier.query-store-for-labels-enabled` is set.
388+
Get label values for a given label name. Starting from release v1.18.0, Cortex by default honors the `start` and `end` request parameters and fetches label values from either ingester, store gateway or both.
391389

392390
_For more information, please check out the Prometheus [get label values](https://prometheus.io/docs/prometheus/latest/querying/api/#querying-label-values) documentation._
393391

docs/configuration/v1-guarantees.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ The Cortex maintainers commit to ensuring future version of Cortex can read data
2323

2424
Cortex strives to be 100% API compatible with Prometheus (under `/prometheus/*` and `/api/prom/*`); any deviation from this is considered a bug, except:
2525

26-
- For queries to the `/api/v1/series`, `/api/v1/labels` and `/api/v1/label/{name}/values` endpoints, query's time range is ignored and the data is always fetched from ingesters. There is experimental support to query the long-term store with the *blocks* storage engine when `-querier.query-store-for-labels-enabled` is set.
2726
- Additional API endpoints for creating, removing and modifying alerts and recording rules.
2827
- Additional API around pushing metrics (under `/api/push`).
2928
- Additional API endpoints for management of Cortex itself, such as the ring. These APIs are not part of the any compatibility guarantees.
@@ -53,7 +52,6 @@ Currently experimental features are:
5352
- OpenStack Swift storage support.
5453
- Metric relabeling in the distributor.
5554
- Scalable query-frontend (when using query-scheduler)
56-
- Querying store for series, labels APIs (`-querier.query-store-for-labels-enabled`)
5755
- Ingester: do not unregister from ring on shutdown (`-ingester.unregister-on-shutdown=false`)
5856
- Distributor: do not extend writes on unhealthy ingesters (`-distributor.extend-writes=false`)
5957
- Tenant Deletion in Purger, for blocks storage.

docs/guides/limitations.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,3 @@ All other characters are not safe to use. In particular, slashes `/` and whitesp
3535
### Length
3636

3737
The tenant ID length should not exceed 150 bytes/characters.
38-
39-
## Query series and labels
40-
41-
When running queries to the `/api/v1/series`, `/api/v1/labels` and `/api/v1/label/{name}/values` endpoints, query's time range is ignored and the data is always fetched from ingesters. There is experimental support to query the long-term store with the *blocks* storage engine when `-querier.query-store-for-labels-enabled` is set.

pkg/ingester/ingester_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2731,7 +2731,7 @@ func Test_Ingester_MetricsForLabelMatchers(t *testing.T) {
27312731
{Labels: cortexpb.FromLabelsToLabelAdapters(fixtures[1].lbls)},
27322732
},
27332733
},
2734-
"should filter metrics by time range if queryStoreForLabels and queryIngestersWithin is enabled": {
2734+
"should filter metrics by time range if queryIngestersWithin is enabled": {
27352735
from: 99999,
27362736
to: 100001,
27372737
matchers: []*client.LabelMatchers{{

pkg/querier/querier_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,6 @@ type mockStoreQuerier struct {
14111411
// Select implements storage.Querier interface.
14121412
// The bool passed is ignored because the series is always sorted.
14131413
func (q *mockStoreQuerier) Select(ctx context.Context, _ bool, sp *storage.SelectHints, matchers ...*labels.Matcher) storage.SeriesSet {
1414-
// We will hit this for /series lookup when -querier.query-store-for-labels-enabled is set.
14151414
// If we don't skip here, it'll make /series lookups extremely slow as all the chunks will be loaded.
14161415
// That flag is only to be set with blocks storage engine, and this is a protective measure.
14171416
if sp != nil && sp.Func == "series" {

0 commit comments

Comments
 (0)