On Thu, 18 Apr 2024 13:47:04 GMT, Jaikiran Pai <[email protected]> wrote:

> Can I please get a review of this change which proposes to fix the issue 
> reported in https://bugs.openjdk.org/browse/JDK-8330572?
> 
> As noted in that issue, the internal method `checkOpen()` should only be 
> called when picking a non-TLS HTTP/1.1 connection from the pool and before 
> handing it out. That method should not be called in any other places.
> 
> The commit in this PR addresses that by removing the call to `checkOpen()` 
> when the connection is being returned back to the pool. The `checkOpen()` 
> call which does a socket channel read is now replaced with a `isOpen()` call 
> which is just a state check.
> 
> Existing tests in tier2 continue to pass with this change. A test repeat of 
> 50 of test/jdk/java/net/httpclient tests too passes without any regressions. 
> No new test has been added given the nature of this change.

This pull request has now been integrated.

Changeset: 9f2a4fad
Author:    Jaikiran Pai <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/9f2a4fad1715ccbc339d2476bbdc7a52e9a13380
Stats:     2 lines in 1 file changed: 0 ins; 0 del; 2 mod

8330572: jdk.internal.net.http.HttpConnection calls an expensive checkOpen() 
when returning a HTTP/1.1 connection to the pool

Reviewed-by: dfuchs, djelinski

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

PR: https://git.openjdk.org/jdk/pull/18840

Reply via email to