Batch index lookups on BigTable#971
Merged
tomwilkie merged 4 commits intocortexproject:masterfrom Sep 3, 2018
Merged
Conversation
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
5eea0b5 to
387a6f3
Compare
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
390aa69 to
453785a
Compare
Contributor
csmarchbanks
left a comment
There was a problem hiding this comment.
Some small comments/questions. Overall LGTM
| @@ -0,0 +1,77 @@ | |||
| package util | |||
Contributor
There was a problem hiding this comment.
Why the util package instead of another thing in chunk? I think everywhere that uses this right now uses chunk as well
Contributor
Author
There was a problem hiding this comment.
I agree util packages suck, but I'm trying to break the chunk package up - its a bit of a behemoth, and I find I regularly get into circular imports with it. Hence this got stuck in a new package.
|
|
||
| return entries, nil | ||
| }) | ||
| return entries, err |
Contributor
There was a problem hiding this comment.
Keeping the log message might be nice
pkg/chunk/gcp/storage_client.go
Outdated
| strings.TrimPrefix(b.items[index].Column, b.columnPrefix), | ||
| ) | ||
| func (b *bigtableReadBatchColumnKey) RangeValue() []byte { | ||
| return []byte(strings.TrimPrefix(b.items[b.i].Column, b.columnPrefix)) |
Contributor
There was a problem hiding this comment.
Consider inlining the columnPrefix since it is static? Then it would not need to be on bigtableReadBatchColumnKey
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
tomwilkie
added a commit
to grafana/cortex
that referenced
this pull request
Sep 3, 2018
…ch-index-lookups"" This reverts commit 8b74f90. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
tomwilkie
added a commit
that referenced
this pull request
Sep 3, 2018
Revert "Merge pull request #971 from grafana/batch-index-lookups"
tomwilkie
added a commit
to grafana/cortex
that referenced
this pull request
Sep 11, 2018
…ch-index-lookups"" This reverts commit 8b74f90. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Contributor
|
This was reverted and replaced by #981 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the series index, resolving series ID to chunk IDs can issues 100s of thousands of queries to the index. The cache does a good job of handling most of these, but we should batch the rest.
As part of this I changes the BigTable backend to only read full rows - this shouldn't impact performance, as the index cache was forcing us to only read full rows anyway. I also changed the ReadBatch interface to be iterator-style, so we can filter it down without copies.
Fixes #969