-
Notifications
You must be signed in to change notification settings - Fork 802
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
Blocks querier: don't reencode TSDB chunks to Cortex chunks during querying #2061
Blocks querier: don't reencode TSDB chunks to Cortex chunks during querying #2061
Conversation
Blocks querier now report samples from TSDB chunks directly, without reencoding them to Cortex chunks. Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
It was used to generate invalid data, but we no longer do the conversion where this could be detected. Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @pstibrany! Overall, looks good to me. I left few comments to see if we can simplify a bit the implementation.
chunks = append(chunks, chunk.NewChunk(userID, client.Fingerprint(lbls), lbls, ch, model.Time(c.MinTime), model.Time(c.MaxTime))) | ||
// blockQuerierSeriesIterator implements a series iterator on top | ||
// of a list of time-sorted, non-overlapping chunks. | ||
type blockQuerierSeriesIterator struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given we're copy-pasting Thanos code here, I would suggest to ask @bwplotka if they're willing to accept a PR to expose newChunkSeriesIterator
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, it doesn't seem worth the troubles for 50 lines of code to me.
But since I just found a bug in that iterator code (it calls At()
before calling Next()
, which it shouldn't), I may try to send patch with the bugfix and making it public. (But it's still low prio)
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
called multiple times. Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
…on on iterators it owns. Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Thank you for your review Marco. I've addressed all feedback, except sending PR to Thanos (but I believe I've fixed the implementation of iterator). |
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pstibrany for addressing my feedback! Changes LGTM and affect only the blocks storage, so should be safe to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shipit!
This rewrites BlocksQuerier to implement
Queryable
interface. It does that by implementingstorage.SeriesSet
on top of returnedstreamedresponse fromStoreClient.Series
call.Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]