You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/06/23 16:49:28 UTC

[GitHub] [druid] jihoonson opened a new issue #10061: Investigate ListenableFuture usages and replace it with CompletableFuture if possible

jihoonson opened a new issue #10061:
URL: https://github.com/apache/druid/issues/10061


   ### Description
   
   `CompletableFuture` provided since Java 8 can cover many use cases of `ListenableFuture`. The purpose of this issue is to investigate how we are using `ListenableFuture` and replace it with `CompletableFuture` if possible. This issue may include modifying `PrioritizedExecutorService` or adding a new one to replace it to support query priority with `CompletableFuture`.
   
   ### Motivation
   
   Druid uses `ListenableFuture` in many places. One of the popular use cases is to handle multiple futures which should be done all together in time out. However, as reported in https://github.com/apache/druid/pull/10027, `ListenableFuture` doesn't cancel underlying futures on cancel() which leads to potential resource leak. https://github.com/apache/druid/pull/10027 addresses this problem by adding a util method which cancels all futures which is duplicate but in a less structured way with what `CompletableFuture` does.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org