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

promql.ActiveQueryTracker: Unmap mmapped file when done #14000

Merged
merged 5 commits into from
May 27, 2024

Conversation

aknuds1
Copy link
Contributor

@aknuds1 aknuds1 commented Apr 29, 2024

Fix promql.ActiveQueryTracker so that it unmaps any mmapped file in its Close method. Also fix TestMMapFile so it releases resources.

Related to #13948.

@aknuds1 aknuds1 requested a review from machine424 April 29, 2024 14:19
@aknuds1 aknuds1 force-pushed the arve/query-logger-munmap branch 3 times, most recently from 6ecd506 to fd57350 Compare April 30, 2024 09:24
@aknuds1 aknuds1 force-pushed the arve/query-logger-munmap branch 6 times, most recently from a021167 to 0035609 Compare May 9, 2024 09:58
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Copy link
Collaborator

@machine424 machine424 left a comment

Choose a reason for hiding this comment

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

Thanks!

promql/query_logger.go Show resolved Hide resolved
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
@aknuds1
Copy link
Contributor Author

aknuds1 commented May 16, 2024

@machine424 I pushed a revision also to fix flakiness in TestQueryConcurrency, since non-deterministic goroutine behaviour in it (goroutines continuing after memory unmapping) would cause panics in combination with my changes in this PR.

Copy link
Collaborator

@machine424 machine424 left a comment

Choose a reason for hiding this comment

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

lgtm, thanks.
just some nits and ideas for the future :)

promql/query_logger.go Outdated Show resolved Hide resolved
promql/query_logger_test.go Show resolved Hide resolved
promql/query_logger.go Show resolved Hide resolved
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
@aknuds1 aknuds1 merged commit 707e9d9 into prometheus:main May 27, 2024
25 checks passed
@aknuds1 aknuds1 deleted the arve/query-logger-munmap branch May 27, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants