Skip to content

Conversation

@j-bahr
Copy link
Contributor

@j-bahr j-bahr commented Oct 18, 2025

As of Netty 4.2 io_uring support has been promoted out of incubator netty-incubator-transport-native-io_uring and is now located at netty-transport-native-io_uring

In Netty 4.2.0.Final we have graduated the io_uring transport from incubator, to a fully supported first-class transport module. (https://netty.io/news/2025/04/03/4-2-0.html)

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 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.

  1. To remove io_uring incubator the default, Java 8, source must throw exceptions for all methods in DefaultLoopIOUring and expressly mark isIoUringAvailable = false.

  2. 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.

@j-bahr j-bahr force-pushed the io_uring-support branch 5 times, most recently from 4d0766f to 3a926ef Compare October 18, 2025 22:43
@violetagg
Copy link
Member

@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.

@j-bahr
Copy link
Contributor Author

j-bahr commented Oct 21, 2025

@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 nio or epoll transports and it seems unlikely that many folks would include the io_uring incubator packages on the class path given that it's end of life and will not receive bug fixes or security patches.

@j-bahr j-bahr force-pushed the io_uring-support branch 2 times, most recently from 58b287e to 4560d28 Compare October 21, 2025 19:45
@violetagg
Copy link
Member

@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 nio or epoll transports and it seems unlikely that many folks would include the io_uring incubator packages on the class path given that it's end of life and will not receive bug fixes or security patches.

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?

@j-bahr j-bahr force-pushed the io_uring-support branch 2 times, most recently from 2b41fa5 to e8cee41 Compare October 26, 2025 19:21
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]>
`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]>
@violetagg
Copy link
Member

Thanks for the PR!

@violetagg violetagg merged commit f1fdcc5 into reactor:main Oct 27, 2025
16 checks passed
@violetagg violetagg added this to the 1.3.0 milestone Oct 27, 2025
@violetagg violetagg added the type/enhancement A general enhancement label Oct 27, 2025
@violetagg violetagg changed the title io_uring loop resources should support Java 11+ IO_Uring loop resources should support Java 11+ Oct 27, 2025
@violetagg violetagg changed the title IO_Uring loop resources should support Java 11+ IO_Uring loop resources should support Java 11+ Oct 27, 2025
@j-bahr
Copy link
Contributor Author

j-bahr commented Oct 27, 2025

@violetagg thanks for merging and thanks for fixing a few of the issues I was working through on the workflow files.

@j-bahr j-bahr deleted the io_uring-support branch October 27, 2025 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants