Skip to content
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

storage/prometheus: close querier at the end #484

Merged
merged 2 commits into from
Sep 21, 2024

Conversation

GiedriusS
Copy link
Member

We are trying to reuse memory and hitting a bug where the querier is closed too soon. Prometheus closes the querier at the end of Exec(). We should do that too.

@GiedriusS GiedriusS force-pushed the querier_close_at_the_end branch 3 times, most recently from c0481a6 to 448b43c Compare September 17, 2024 15:05
@GiedriusS GiedriusS marked this pull request as ready for review September 17, 2024 15:06
@GiedriusS GiedriusS force-pushed the querier_close_at_the_end branch from 448b43c to dfc4015 Compare September 17, 2024 15:08
@GiedriusS GiedriusS force-pushed the querier_close_at_the_end branch 9 times, most recently from 06521a6 to 1c9cee0 Compare September 19, 2024 09:32
We are trying to reuse memory and hitting a bug where the querier is
closed too soon. Prometheus closes the querier at the end of Exec(). We
should do that too.

Signed-off-by: Giedrius Statkevičius <[email protected]>
@GiedriusS GiedriusS force-pushed the querier_close_at_the_end branch from 1c9cee0 to 0729ea7 Compare September 19, 2024 09:50
func NewPrometheusScanners(queryable storage.Queryable, qOpts *query.Options, lplan logicalplan.Plan) (*Scanners, error) {
var min, max int64
if lplan != nil {
min, max = findMinMaxTime(lplan, qOpts)
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldnt this be set in logicalplan?

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved the logic to the logical plan.

@GiedriusS GiedriusS force-pushed the querier_close_at_the_end branch from d123622 to 38856a9 Compare September 19, 2024 10:41
@GiedriusS GiedriusS merged commit 37747ed into main Sep 21, 2024
7 checks passed
@GiedriusS GiedriusS deleted the querier_close_at_the_end branch September 21, 2024 09:24
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.

3 participants