[jdk8u-dev] RFR: 8293562: KeepAliveCache Blocks Threads while Closing Connections

Severin Gehwolf sgehwolf at openjdk.org
Tue Jan 30 13:16:45 UTC 2024


On Mon, 18 Dec 2023 19:11:29 GMT, Dhamoder Nalla <dhanalla at openjdk.org> wrote:

> Issue: [JDK-8293562](https://bugs.openjdk.org/browse/JDK-8293562): KeepAliveCache Blocks Threads while Closing Connections
> Backport of PR https://github.com/openjdk/jdk11u-dev/pull/1890 fromJDK11 to JDK8.
> 
> The JDK11 patch doesn't apply cleanly 3/11 hunks need to be ported manually in KeepAliveCache.java.
> 
> Test performed:
> 
> JTreg jdk_tier1
> JTreg jdk_tier2
> New test case added to this PR passed with the fix and failed without it.

This PR seems OK. It would have been easier to review if the whitespace wasn't all different. Consider adding https://github.com/jerboaa/jdk8u-dev/commit/054efe518681e6334b700c8a236fa4c508db640d to make this more aligned with JDK 11u. Finally, I wonder if we should bring in https://bugs.openjdk.org/browse/JDK-8278067 first so as to make the patch cleaner (as compared to JDK 11). That one is in 8u361 oracle as well, so would probably good to have and seems low risk. Meanwhile, please apply for approval for #407 so this can get in.

jdk/src/share/classes/sun/net/www/http/KeepAliveCache.java line 147:

> 145:         // close after releasing locks
> 146:         if (oldClient != null) {
> 147:             oldClient.closeServer();

Whitespace and aligned-ness of braces are off here.

jdk/src/share/classes/sun/net/www/http/KeepAliveCache.java line 231:

> 229:                      hc.closeServer();
> 230:                }
> 231:           }

There are some whitespace issues here. Please clean this up.

jdk/src/share/classes/sun/net/www/http/KeepAliveCache.java line 270:

> 268: 
> 269:         long currentTime = System.currentTimeMillis();
> 270:             if ((currentTime - e.idleStartTime) > nap) {

Indenting is off.

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

PR Review: https://git.openjdk.org/jdk8u-dev/pull/409#pullrequestreview-1851209457
PR Review Comment: https://git.openjdk.org/jdk8u-dev/pull/409#discussion_r1471177551
PR Review Comment: https://git.openjdk.org/jdk8u-dev/pull/409#discussion_r1471175985
PR Review Comment: https://git.openjdk.org/jdk8u-dev/pull/409#discussion_r1471175426


More information about the jdk8u-dev mailing list