-
Notifications
You must be signed in to change notification settings - Fork 690
IO_Uring loop resources should support Java 11+
#3974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4d0766f to
3a926ef
Compare
reactor-netty-core/src/test/java/reactor/netty/resources/DefaultLoopResourcesTest.java
Fixed
Show fixed
Hide fixed
reactor-netty-core/src/test/java/reactor/netty/resources/DefaultLoopResourcesTest.java
Fixed
Show fixed
Hide fixed
|
@j-bahr We cannot remove the IO_Uring incubator because of compatibility reasons and because there is nothing that can be used when on JDK 8, so please keep it. |
|
@violetagg, thanks for the feedback, I am happy to add back the logic for the io_uring incubator so that we can merge the other fixes. Can you help me understand the rationale behind using the incubator package for Java 8? Java 8 users still have the ability to use |
3a926ef to
4380e2a
Compare
reactor-netty-core/src/test/java/reactor/netty/resources/DefaultLoopResourcesTest.java
Dismissed
Show dismissed
Hide dismissed
58b287e to
4560d28
Compare
Unfortunately we don't know whether it is used or not. We can add a note that the incubator is not supported anymore and deprecate it then eventually in the next version we can remove the support. Wdyt? |
2b41fa5 to
e8cee41
Compare
Everything in the netty io_uring module is compiled for Java 9 and above excluding `io.netty.channel.uring.IoUring` to allow for calls to `isAvailable()` from Java 8 code. Currently in reactor-netty we compile support for io_uring as multi release source with a release version 17, which means that only Java 17+ will be able to run the code. Older releases such as JDK 11 will get the default implementation which is compiled against the incubator release. This actually causes failures if you supply your own io_uring event loop in java 11 and the incubator is missing from the classpath. This PR aims to fix the package to allow io_uring for all releases above Java 11. To enable use of io_uring in JDK 11 and above we need to move the implementation of `DefaultLoopIOUring` to a Java 11 multi release folder and update the gradle build file. I suggest targeting Java 11 here because Java 9 & 10 are not LTS release, not receiving updates and there is a low probability that they are being used in production. This should allow users using Java 11+ to use the actual io_uring module from netty, using either reactor-netty's default loop resources or by allowing user to supply their own. Signed-off-by: Jeff Bahr <[email protected]>
e8cee41 to
cfdce56
Compare
`check_netty_4_1_snapshots.yml` workflow is executed against Reactor Netty version `1.2.x`. In this version there is only integration with `netty-incubator-transport-native-io_uring` as this version is built against `Netty 4.1`. The build against `Netty 4.2` is just to verify Netty backwards compatibility and not to test the new features coming with `Netty 4.2`. Signed-off-by: Violeta Georgieva <[email protected]>
`check_netty_4_1_snapshots.yml` workflow is executed against Reactor Netty version `1.2.x`. In this version there is only integration with `netty-incubator-transport-native-io_uring` as this version is built against `Netty 4.1`. The build against `Netty 4.2` is just to verify Netty backwards compatibility and not to test the new features coming with `Netty 4.2`. Signed-off-by: Violeta Georgieva <[email protected]>
|
Thanks for the PR! |
Java 11+
Java 11+IO_Uring loop resources should support Java 11+
|
@violetagg thanks for merging and thanks for fixing a few of the issues I was working through on the workflow files. |
As of Netty 4.2 io_uring support has been promoted out of incubator
netty-incubator-transport-native-io_uringand is now located atnetty-transport-native-io_uringEverything in the netty io_uring module is compiled for Java 9 and above excluding
io.netty.channel.uring.IoUringto allow for calls toisAvailable()from Java 8 code.Currently in reactor-netty we compile support for io_uring as multi release source with a release version 17, which means that only Java 17+ will be able to run the code. Older releases such as JDK 11 will get the default implementation which is compiled against the incubator release. This actually causes failures if you supply your own io_uring event loop in java 11 and the incubator is missing from the classpath.
This PR aims to fix two things (1) we should not compile against incubator code as it's now unsupported (2) we should allow io_uring for all releases above Java 9.
To remove io_uring incubator the default, Java 8, source must throw exceptions for all methods in
DefaultLoopIOUringand expressly markisIoUringAvailable = false.To enable use of io_uring in JDK 11 and above we need to move the implementation of
DefaultLoopIOUringto a Java 11 multi release folder and update the gradle build file. I suggest targeting Java 11 here because Java 9 & 10 are not LTS release, not receiving updates and there is a low probability that they are being used in production.This should allow users using Java 11+ to use the actual io_uring module from netty, using either reactor-netty's default loop resources or by allowing user to supply their own.