Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upUsing `Select()` for both sample+metadata queries is unsuitable for remote storage implementations #4057
Comments
juliusv
added
the
component/local storage
label
Apr 6, 2018
This comment has been minimized.
This comment has been minimized.
|
I already mentioned the option of adding a separate querier method or The other option would be to modify the web API package to allow explicitly passing in two different |
juliusv
added
the
component/api
label
Apr 6, 2018
This comment has been minimized.
This comment has been minimized.
|
I have this same issue for promxy. I could also live with a flag in the |
jacksontj
added a commit
to jacksontj/promxy
that referenced
this issue
Jul 11, 2018
jacksontj
added a commit
to jacksontj/promxy
that referenced
this issue
Aug 15, 2018
jacksontj
referenced this issue
Aug 15, 2018
Merged
For the series() call don't fetch all the data too #67
jacksontj
added a commit
to jacksontj/promxy
that referenced
this issue
Aug 15, 2018
jacksontj
added a commit
to jacksontj/promxy
that referenced
this issue
Aug 15, 2018
jacksontj
added a commit
to jacksontj/prometheus
that referenced
this issue
Aug 27, 2018
jacksontj
added a commit
to jacksontj/prometheus
that referenced
this issue
Aug 27, 2018
brian-brazil
added a commit
that referenced
this issue
Aug 28, 2018
This comment has been minimized.
This comment has been minimized.
|
@juliusv does anything need to be done on the tsdb side? |
juliusv
added
component/remote storage
and removed
component/local storage
labels
Nov 9, 2018
This comment has been minimized.
This comment has been minimized.
|
@krasi-georgiev I changed the labels from local to remote storage. |
This comment has been minimized.
This comment has been minimized.
|
thanks |
juliusv commentedApr 6, 2018
The
storage.Querierinterface has aSelect()method which can be used to retrieve either only metadata or bulk sample data of series. In the local storage case, this works nicely, as sample data is loaded lazily when accessed, and thus metadata-only queries never over-fetch sample data. This breaks down for remote storage implementations of the same interface, where we cannot afford to lazily fetch sample data only as it's accessed (that would require more remote round trips). We need some way of knowing beforehand (when we callSelect()) whether a query is metadata-only or whether it actually needs sample data. Either a separate method or query parameter would work.Context: Cortex reuses Prometheus's web API and PromQL packages to offer comparable functionality based on a different storage engine. In the past, we were able to solve this issue because the Prometheus web API packages allowed injecting two different queriers: one that would be used as part of the PromQL engine (the full sample querier) and one that would be used for metadata queries. This got broken in 7ccd4b3#diff-d81f5cda89ea7b129ba708b586c2bc83L132, due to a PromQL engine restructuring (the querier is not part of the engine anymore, it gets passed in for every query, and the web API only knows about one querier now, because we cannot encapsulate the other one in the engine anymore).
The issue about this on the Cortex side is cortexproject/cortex#787