-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 DynamicFilter future resilient to cancel #5099
Conversation
Can you please add rationale to the commit message? Also, would it be possible to cover the rogue effects of cancellation with an integration test too? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % comments
presto-main/src/test/java/io/prestosql/server/TestDynamicFilterService.java
Outdated
Show resolved
Hide resolved
presto-main/src/test/java/io/prestosql/server/TestDynamicFilterService.java
Outdated
Show resolved
Hide resolved
presto-main/src/test/java/io/prestosql/server/TestDynamicFilterService.java
Outdated
Show resolved
Hide resolved
presto-main/src/test/java/io/prestosql/server/TestDynamicFilterService.java
Outdated
Show resolved
Hide resolved
presto-main/src/test/java/io/prestosql/server/TestDynamicFilterService.java
Outdated
Show resolved
Hide resolved
presto-main/src/test/java/io/prestosql/sql/planner/TestLocalDynamicFiltersCollector.java
Show resolved
Hide resolved
Cancelling CompletableFuture returned by DynamicFilter#isBlocked should not affect dynamic filter collection. If cancellation of a future from a consumer of DynamicFilter is allowed to propgate into DynamicFilterService or LocalDynamicFiltersCollector, then it will prevent the completion of collection of that dynamic filter and it's usage by other consumers.
0db98e9
to
adf0988
Compare
@findepi I've updated the commit message with a more detailed description. |
should we cancel the collection (and release associated resources) when connector cancels the DF future? |
Same future might be used by multiple connectors. It would require us tracking that all DF consumers cancelled that future. We then could potentially forget that particular DF. However, we fetch DFs from workers regardless. I think such mechanism would incur extra complexity which might not be needed at this point. |
Like in
? |
More like:
but union works too |
@findepi if you don't have any more comments, I will merge it |
merged, thanks! |
Cancelling CompletableFuture returned by DynamicFilter#isBlocked
should not affect dynamic filter collection. If cancellation of
a future from a consumer of DynamicFilter is allowed to propgate
into DynamicFilterService or LocalDynamicFiltersCollector,
then it will prevent the completion of collection of that
dynamic filter and it's usage by other consumers.