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

Make WorkProcessor#blocking always execute futureSupplier #15711

Merged
merged 1 commit into from
Jan 16, 2023

Conversation

sopel39
Copy link
Member

@sopel39 sopel39 commented Jan 13, 2023

A common patter across operators is calling WorkProcessor#blocking to report memory usage:
.blocking(() -> memoryContext.setBytes(localAggregatedMemoryContext.getBytes()));

However, before this change lambda wasn't called when upstream processor yielded or was blocked.
This change makes lambda to be always called which makes reporting of operator memory usage more accurate.

Fixes #15679

Release notes

( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text:

# Section
* Make table scan memory usage reporting more accurate. ({issue}`issuenumber`)

@sopel39 sopel39 requested review from losipiuk and arhimondr January 13, 2023 13:21
@cla-bot cla-bot bot added the cla-signed label Jan 13, 2023
A common patter across operators is calling WorkProcessor#blocking
to report memory usage:
.blocking(() -> memoryContext.setBytes(localAggregatedMemoryContext.getBytes()));

However, before this change lambda wasn't called when
upstream processor yielded or was blocked.
This change makes lambda to be always called which makes
reporting of operator memory usage more accurate.
@sopel39 sopel39 merged commit c41c3e1 into trinodb:master Jan 16, 2023
@sopel39 sopel39 deleted the ks/blocking branch January 16, 2023 11:01
@sopel39 sopel39 mentioned this pull request Jan 16, 2023
@github-actions github-actions bot added this to the 406 milestone Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Improve ScanFilterAndProject memory accounting
2 participants