-
Notifications
You must be signed in to change notification settings - Fork 9
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
Merge upstream at 140f4aa #782
Conversation
* allow customizing TSDB postings decoder --------- Signed-off-by: Ben Ye <benye@amazon.com>
…-prometheus # Conflicts: # tsdb/block.go # tsdb/compact.go # tsdb/db.go # tsdb/index/index.go # tsdb/index/index_test.go # tsdb/querier_bench_test.go
|
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.
Approved with comment (I think I'll just make that a separate PR)
I believe the fact that types changed makes it hard to actually mess this up due to compiler checks. Also index/labelvalues.go seems totally analogous to the upstream changes.
@@ -697,7 +702,7 @@ func (db *DBReadOnly) Blocks() ([]BlockReader, error) { | |||
return nil, ErrClosed | |||
default: | |||
} | |||
loadable, corrupted, err := openBlocks(db.logger, db.dir, nil, nil, nil, DefaultPostingsForMatchersCacheTTL, DefaultPostingsForMatchersCacheMaxItems, DefaultPostingsForMatchersCacheMaxBytes, DefaultPostingsForMatchersCacheForce) | |||
loadable, corrupted, err := openBlocks(db.logger, db.dir, nil, nil, DefaultPostingsDecoderFactory, nil, DefaultPostingsForMatchersCacheTTL, DefaultPostingsForMatchersCacheMaxItems, DefaultPostingsForMatchersCacheMaxBytes, DefaultPostingsForMatchersCacheForce) |
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.
note: this is weird in upstream as well, why would the default be able to decode all? why isn't this coming from options?
func NewFileReader(path string) (*Reader, error) { | ||
return NewFileReaderWithOptions(path, nil) | ||
func NewFileReader(path string, decoder PostingsDecoder) (*Reader, error) { | ||
return NewFileReaderWithOptions(path, decoder, nil) | ||
} | ||
|
||
// NewFileReaderWithOptions is like NewFileReader but allows to pass a cache provider and sharding function. |
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.
While we're here. The doc string wasn't true since #411
// NewFileReaderWithOptions is like NewFileReader but allows to pass a cache provider and sharding function. | |
// NewFileReaderWithOptions is like NewFileReader but allows to pass a cache provider. |
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.
This PR advances this fork closer to upstream Prometheus
main
, bringing in the changes from prometheus/prometheus@140f4aa, which is the merge of prometheus/prometheus#13567.This merge had a number of conflicts. While I believe I've merged this correctly given there were minimal conflicts in the tests and all tests are passing, carefully checking these changes would be appreciated.
Conflicts were in:
tsdb/block.go
tsdb/compact.go
tsdb/db.go
tsdb/index/index.go
tsdb/index/index_test.go
tsdb/querier_bench_test.go