jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8327991: Improve HttpClient documentation with regard to reclaiming resources

Open dfuch opened this issue 1 year ago • 7 comments

Please find here a doc-only change that tries to better document how resources allocated by the HttpClient are reclaimed. The @implNote in the HttpClient class level API documentation is extended to document what happens if you don't explicitly close the HttpClient. The note is refactored to introduce the notion of streaming or publishing bodies. BodySubscribers and BodyHandlers now have links that link back to the HttpClient API note, as well as identifying methods that return publishing or streaming body implementations.


Progress

  • [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [ ] Change requires CSR request JDK-8328100 to be approved
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue

Issues

  • JDK-8327991: Improve HttpClient documentation with regard to reclaiming resources (Enhancement - P3)
  • JDK-8328100: Improve HttpClient documentation with regard to reclaiming resources (CSR)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18270/head:pull/18270
$ git checkout pull/18270

Update a local copy of the PR:
$ git checkout pull/18270
$ git pull https://git.openjdk.org/jdk.git pull/18270/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18270

View PR using the GUI difftool:
$ git pr show -t 18270

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18270.diff

Webrev

Link to Webrev Comment

dfuch avatar Mar 13 '24 12:03 dfuch

:wave: Welcome back dfuchs! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Mar 13 '24 12:03 bridgekeeper[bot]

@dfuch The following label will be automatically applied to this pull request:

  • net

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

openjdk[bot] avatar Mar 13 '24 12:03 openjdk[bot]

/csr

dfuch avatar Mar 13 '24 14:03 dfuch

@dfuch has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@dfuch please create a CSR request for issue JDK-8327991 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

openjdk[bot] avatar Mar 13 '24 14:03 openjdk[bot]

A draft CSR can be seen here: https://bugs.openjdk.org/browse/JDK-8328100 Diff of the doc changes will be pasted into the CSR after this PR is reviewed. Let's agree on the wording here first.

dfuch avatar Mar 13 '24 15:03 dfuch

@dfuch This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8327991: Improve HttpClient documentation with regard to reclaiming resources

Reviewed-by: michaelm, jpai

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 251 new commits pushed to the master branch:

  • 153410f480c372604e5825bfcd3a63f137e6a013: 8328930: [AIX] remove pase related coding
  • da8a095a19c90e7ee2b45fab9b533a1092887023: 8328928: Serial: Use IsGCActiveMark instead of AutoModifyRestore in SerialHeap::do_collection
  • 472fcb6e6e5fce4d5166a73894d1e7e4bd91bc58: 8328508: Unify the signatures of the methods address_for_index() and index_for() in BOT implementations
  • cc1800fa4de3c1369efd46f5ca967ea82763f5d5: 8327998: Enable java/lang/ProcessBuilder/JspawnhelperProtocol.java on Mac
  • b9c76dedf4aa2248a5e561a535c9e3e181f7836a: 8329074: AIX build fails after JDK-8328824
  • 7b1f2c801fee6366ee37e873cda29c1ae7ad7e74: 8327493: Update minimum Xcode version in docs
  • 9d441e3e56e733d64dbadde6854761e4545c1c70: 8283223: gc/stringdedup/TestStringDeduplicationFullGC.java#Parallel failed with "RuntimeException: String verification failed"
  • 44549b605a7aad1e3143a4058ef6504a7c04167a: 8329012: IGV: Update required JDK version in README.md
  • 5d19d15517f08e13dc4b2025bf289091e47fa55b: 8325186: JVMTI VirtualThreadGetThreadStateClosure class is no longer used and should be removed
  • 5f7432f7b1ca52941b717fd35a929c91fbdd276d: 8328758: GetCurrentContendedMonitor function should use JvmtiHandshake
  • ... and 241 more: https://git.openjdk.org/jdk/compare/0776fff0e321c3f541354404b3ec0aa1992923a0...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

openjdk[bot] avatar Mar 13 '24 20:03 openjdk[bot]

/integrate

dfuch avatar Mar 26 '24 20:03 dfuch

Going to push as commit 2725405ac9d93761e26812d010d315a48f86071c. Since your change was applied there have been 253 commits pushed to the master branch:

  • db01fcd6d8c24b01a1f23c71b2917ff396b0686f: 8328827: Convert java/awt/print/PrinterJob/PrinterDialogsModalityTest/PrinterDialogsModalityTest.html applet test to main
  • 89e0889ab3beb96103ee381d9a54614e49e6d9d7: 8328858: More runtime/stack tests fail intermittently on libgraal
  • 153410f480c372604e5825bfcd3a63f137e6a013: 8328930: [AIX] remove pase related coding
  • da8a095a19c90e7ee2b45fab9b533a1092887023: 8328928: Serial: Use IsGCActiveMark instead of AutoModifyRestore in SerialHeap::do_collection
  • 472fcb6e6e5fce4d5166a73894d1e7e4bd91bc58: 8328508: Unify the signatures of the methods address_for_index() and index_for() in BOT implementations
  • cc1800fa4de3c1369efd46f5ca967ea82763f5d5: 8327998: Enable java/lang/ProcessBuilder/JspawnhelperProtocol.java on Mac
  • b9c76dedf4aa2248a5e561a535c9e3e181f7836a: 8329074: AIX build fails after JDK-8328824
  • 7b1f2c801fee6366ee37e873cda29c1ae7ad7e74: 8327493: Update minimum Xcode version in docs
  • 9d441e3e56e733d64dbadde6854761e4545c1c70: 8283223: gc/stringdedup/TestStringDeduplicationFullGC.java#Parallel failed with "RuntimeException: String verification failed"
  • 44549b605a7aad1e3143a4058ef6504a7c04167a: 8329012: IGV: Update required JDK version in README.md
  • ... and 243 more: https://git.openjdk.org/jdk/compare/0776fff0e321c3f541354404b3ec0aa1992923a0...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Mar 26 '24 20:03 openjdk[bot]

@dfuch Pushed as commit 2725405ac9d93761e26812d010d315a48f86071c.

:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

openjdk[bot] avatar Mar 26 '24 20:03 openjdk[bot]