Skip to content

Update prometheus #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

Merged
merged 10 commits into from
Apr 26, 2018
Merged

Update prometheus #802

merged 10 commits into from
Apr 26, 2018

Conversation

bboreham
Copy link
Contributor

This is a re-run of #763, updated to address the broken assumption about which queriers are used where.

@bboreham bboreham force-pushed the 762-update-prometheus branch from e276615 to e184829 Compare April 18, 2018 10:27
@bboreham bboreham force-pushed the 762-update-prometheus branch from e184829 to 9e41258 Compare April 20, 2018 13:41
Gopkg.toml Outdated
@@ -19,6 +19,10 @@
name = "github.com/prometheus/prometheus"
branch = "master"

[[constraint]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we want to have comments for newly added constraints?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good spot

func NewEngine(distributor Querier, chunkStore ChunkStore) *promql.Engine {
queryable := NewQueryable(distributor, chunkStore, false)
return promql.NewEngine(queryable, nil)
func NewEngine(distributor Querier, chunkStore ChunkStore, reg prometheus.Registerer, maxConcurrent int, timeout time.Duration) (*promql.Engine, storage.Queryable) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having NewEngine() return both an engine and a queryable seems messy, or at least not appropriate naming anymore. Maybe just get rid of this tiny wrapper and have the caller call both NewQueryable() and promql.NewEngine?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed; I've done this.

We don't need more specific parameters as ruler already knows the
number of workers and has a timeout.
@bboreham
Copy link
Contributor Author

I've also re-applied the change described at #763 (comment) which I hadn't noticed before #763 was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants