8294399: (ch) Refactor some methods out of sun.nio.ch.UnixFileDispatcherImpl#3631
8294399: (ch) Refactor some methods out of sun.nio.ch.UnixFileDispatcherImpl#3631shruacha1234 wants to merge 2 commits intoopenjdk:masterfrom
Conversation
Signed-off-by: Shruthi <Shruthi.Shruthi1@ibm.com>
|
👋 Welcome back shruacha1234! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
This backport pull request has now been updated with issue from the original commit. |
|
@AlanBateman Can you please review this PR |
Webrevs
|
|
Hi @shruacha1234 |
|
/approval 8294399 request the backport fix. The
These methods are being relocated to a new class, |
|
@shruacha1234 |
galderz
left a comment
There was a problem hiding this comment.
The changes look fine to me. The changes that were originally UnixFileDispatcherImpl.[java/c] align with the ones in FileDispatcherImpl.[java/c].
What testing have you done to validate the changes? Once that is explained and validated I'll approve.
|
@galderz
|
|
@galderz |
|
Hi @GoeLin
I successfully created a local AIX build with this PR changes and verified it by running jtreg tests for java/net and java/nio. All tests passed without issues. Please let me know if there is anything else required for the approval |
|
Small question, why do we backport refactoring changes? |
|
Also, if you want to backport https://bugs.openjdk.org/browse/JDK-8317801, please first backport it to 25, then 21. |
|
@tstuefe |
I’m backporting 8294399 because it introduces the UnixDispatcher class, which is a necessary foundation for other functional fixes, including the one in openjdk/jdk#25817. Although it’s a refactoring change, it helps separate platform-specific logic into a dedicated class, making the code cleaner and easier to maintain. More importantly, the fix that address real issues (async close handling and race conditions) are built on top of this refactoring. Without backporting 8294399, those fixes cannot be cleanly or safely applied to JDK 17. |
|
@GoeLin Can you please let me know if we can port this backport PR with the below justification?
|
I have backported the fix to JDK25. JDK21 backport is in progress. |
|
/approval 8294399 request the backport fix. The FileDispatcherImpl class includes native methods close0(), dup0(), and preClose0(), which are commented as: I’m backporting 8294399 because it introduces the UnixDispatcher class, which is a necessary foundation for other functional fixes, including the one in openjdk/jdk#25817. Although it’s a refactoring change, it helps separate preClose() and dup() method logic into a dedicated class, making the code cleaner and easier to maintain. More importantly, the fix that address real issues (async close handling and race conditions) are built on top of this refactoring. Without backporting 8294399, those fixes cannot be cleanly or safely applied to JDK 17. I was able to create a successful AIX local build with this patch. Also, I ran the java/net and java/nio jtreg tests, and all are passing |
|
@shruacha1234 |
|
@shruacha1234 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 |
|
@shruacha1234 This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
|
/open |
|
@shruacha1234 This pull request is now open |
https://bugs.openjdk.org/browse/JDK-8317801 fix is now part of both JDK25 and JDK21. Can you please review this PR with the below justification
so that I can backport https://bugs.openjdk.org/browse/JDK-8317801 to JDK17 as well |
Signed-off-by: Shruthi Shruthi.Shruthi1@ibm.com
OpenJDK PR : openjdk/jdk#10434
OpenJDK bug : https://bugs.openjdk.org/browse/JDK-8294399
The original patch does not apply cleanly to JDK17u-dev, as UnixFileDispatcherImpl.java and UnixFileDispatcherImpl.c do not exist in this version.
Instead, JDK 17 uses FileDispatcherImpl.java and FileDispatcherImpl.c under the unix directory for the relevant implementation.
Therefore, the changes were applied manually to align with the JDK 17 structure.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/3631/head:pull/3631$ git checkout pull/3631Update a local copy of the PR:
$ git checkout pull/3631$ git pull https://git.openjdk.org/jdk17u-dev.git pull/3631/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3631View PR using the GUI difftool:
$ git pr show -t 3631Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/3631.diff
Using Webrev
Link to Webrev Comment