RFR: 8277969: HttpClient SelectorManager shuts down when custom Executor rejects a task [v2]

Jaikiran Pai jpai at openjdk.java.net
Thu Mar 10 11:00:51 UTC 2022


On Wed, 9 Mar 2022 16:54:58 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> These changes make sure that pending requests are terminated if the selector manager thread exits due to exceptions.
>> This includes:
>>    1. completing CompletableFutures that were returned to the caller code
>>    2. cancelling requests that are in flight
>>    3. calling onError on BodySubscribers that may not have been completed
>> Note that step 3 is necessary as certain CompletableFutures, such as those returned by `BodySubscribers.ofInputStream`, complete immediately, the operation being eventually completed when the last bite of the response is read. Completing a completable future that is already completed has no effect, this case is handled by completing the BodySubscriber too.
>
> Daniel Fuchs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Incorporated review comments
>  - Merge branch 'master' into executor-shutdown-8277969
>  - 8277969: HttpClient SelectorManager shuts down when custom Executor rejects a task

I went over the remaining changes in this PR and to me these changes look fine.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7196


More information about the net-dev mailing list