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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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 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]>
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.

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.

2 participants