Skip to content

8381670: Revert the changes to GZIPInputStream related to InputStream.available() usage#465

Open
rm-gh-8 wants to merge 1 commit into
openjdk:masterfrom
rm-gh-8:JDK-8381670-V25
Open

8381670: Revert the changes to GZIPInputStream related to InputStream.available() usage#465
rm-gh-8 wants to merge 1 commit into
openjdk:masterfrom
rm-gh-8:JDK-8381670-V25

Conversation

@rm-gh-8

@rm-gh-8 rm-gh-8 commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Backporting JDK-8381670: Revert the changes to GZIPInputStream related to InputStream.available() usage.

This PR reverts changes from JDK-7036144, that caused both a performance regression (JDK-8374644) and a functional regression (JDK-8377896)

Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:

make test TEST=test/jdk/java/util/zip/GZIP

Results attached:

windows-x64-specific-test.log
macos-aarch64-specific-test.log
linux-x64-specific-test.log
linux-aarch64-specific-test.log



Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8381670 needs maintainer approval
  • Change requires CSR request JDK-8381671 to be approved

Issues

  • JDK-8381670: Revert the changes to GZIPInputStream related to InputStream.available() usage (Bug - P3 - Requested)
  • JDK-8381671: Revert the changes to GZIPInputStream related to InputStream.available() usage (CSR)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/465/head:pull/465
$ git checkout pull/465

Update a local copy of the PR:
$ git checkout pull/465
$ git pull https://git.openjdk.org/jdk25u-dev.git pull/465/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 465

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/465.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Apr 15, 2026

Copy link
Copy Markdown

👋 Welcome back rmesde! 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.

@openjdk

openjdk Bot commented Apr 15, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot changed the title Backport 51cd741573330352fc7b7395b1c8aeca8a4bdcf5 8381670: Revert the changes to GZIPInputStream related to InputStream.available() usage Apr 15, 2026
@openjdk

openjdk Bot commented Apr 15, 2026

Copy link
Copy Markdown

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk Bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels Apr 15, 2026
@rm-gh-8 rm-gh-8 marked this pull request as ready for review April 15, 2026 18:23
@openjdk

openjdk Bot commented Apr 15, 2026

Copy link
Copy Markdown

⚠️ @rm-gh-8 This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Apr 15, 2026
@mlbridge

mlbridge Bot commented Apr 15, 2026

Copy link
Copy Markdown

Webrevs

@rm-gh-8

rm-gh-8 commented Apr 15, 2026

Copy link
Copy Markdown
Contributor Author

/approval request for backport of JDK-8381670: Revert the changes to GZIPInputStream related to InputStream.available() usage.

This PR reverts changes from JDK-7036144, that caused both a performance regression (JDK-8374644) and a functional regression (JDK-8377896)

Low risk — this is a rollback to behavior that was stable for decades.

@openjdk

openjdk Bot commented Apr 15, 2026

Copy link
Copy Markdown

@rm-gh-8
8381670: The approval request has been created successfully.

@openjdk openjdk Bot added the approval Requires approval; will be removed when approval is received label Apr 15, 2026
@rm-gh-8

rm-gh-8 commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

@GoeLin Please note that this has been merged in jdk26u (openjdk/jdk26u#165)

@bridgekeeper

bridgekeeper Bot commented May 22, 2026

Copy link
Copy Markdown

@rm-gh-8 This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@rm-gh-8

rm-gh-8 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@GoeLin Please note that this was backported to the Oracle JDK: https://bugs.openjdk.org/browse/JDK-8385365

@simonis

simonis commented Jun 8, 2026

Copy link
Copy Markdown
Member

@GoeLin Please note that this was backported to the Oracle JDK: https://bugs.openjdk.org/browse/JDK-8385365

While that is technically correct, that downport happened before the lengthy discussion on openjdk/jdk#30925 (comment). Oracle is now about to re-integrate those changes which were backed out, but this time guarded by a new system property, such that users can choose between the old and the new behavior.

I suggest we wait until that change (i.e. JDK-8385924: GZIPInputStream.read() behaves differently on some Java versions) lands in JDK 27 and then downport both, this change (i.e. JDK-8381670) and JDK-8385924 simultaneously to JDK 25u. This will make it possible to maintain the original JDK 25 behavior while at the same time give users a chance to switch back to the before JDK 25 behavior with a system property.

@GoeLin

GoeLin commented Jun 8, 2026

Copy link
Copy Markdown
Member

Hi @simonis @rm-gh-8
yes, I also think that as we are now targeting the October release there is enough time to await what happens in head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval Requires approval; will be removed when approval is received backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

3 participants