Upgrade Netty to 4.2.12.Final#4744
Merged
merlimat merged 3 commits intoapache:masterfrom Apr 18, 2026
Merged
Conversation
Migrates io_uring transport from the `io.netty.incubator` incubator module (removed in 4.2) to the graduated `io.netty.channel.uring` package. Adds explicit `netty-transport-classes-epoll` dependency since Netty 4.2 splits epoll classes from native binaries. Replaces `IOUringEventLoopGroup` with `MultiThreadIoEventLoopGroup(IoUringIoHandler.newFactory())` and introduces `EventLoopUtil.isIoUringGroup()` to replace the former `instanceof IOUringEventLoopGroup` checks. Updates LICENSE/NOTICE files in bookkeeper-dist to reflect the new Netty 4.2.12 artifact names (split of netty-codec into netty-codec-base/compression and io_uring moving from io.netty.incubator to io.netty).
TLSContextFactory: Netty 4.2 enables HTTPS endpoint identification on the client side by default (previously null). Explicitly set the algorithm based on the getHostnameVerificationEnabled() config so that disabling hostname verification actually disables it under 4.2. BookieProtoEncodingTest: the V2 batch read request/response tests compared fields on the pre-encoded object against the decoded one. encode() recycles the request (clearing ledgerId etc. to -1); in Netty 4.2 the Recycler returns a fresh object on the next get(), so the comparison failed. Capture the expected values before encode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades Netty from
4.1.130.Finalto4.2.12.Final(latest 4.2.x). This upgrade is needed to enable upgrading theasync-http-clientlibrary, which has switched to Netty 4.2 and is no longer compatible with 4.1.Key changes
4.1.130.Final→4.2.12.Final, removed separatenetty-iouring.versionsince io_uring transport is now part of the main Netty releaseio.netty.incubator.channel.uring→io.netty.channel.uring, class naming conventionIOUring*→IoUring*. TheIOUringEventLoopGroupclass was removed in 4.2 and is replaced byMultiThreadIoEventLoopGroup(IoUringIoHandler.newFactory())netty-transport-classes-epoll(pure Java) +netty-transport-native-epoll(native binaries); added the explicit classes dependency inbookkeeper-server/pom.xmlisIoUringGroup(EventLoopGroup)that usesMultiThreadIoEventLoopGroup.isIoType(IoUringIoHandler.class)sinceinstanceof IOUringEventLoopGroupis no longer possiblebookkeeper-distupdated to reflect new artifact names (netty-codecwas split intonetty-codec-base/netty-codec-compression, io_uring moved fromio.netty.incubatortoio.netty,netty-tcnative-boringssl-static2.0.74 → 2.0.75)EpollEventLoopGroupandNioEventLoopGroupare now deprecated in favor ofMultiThreadIoEventLoopGroupwith factories, but remain functional; this PR keeps using them to minimize surface area of the change.Test plan
mvn install -DskipTests— full build succeedsmvn -pl bookkeeper-dist/{server,all,bkctl} -am package— all three distribution bundles build successfullyTestPerChannelBookieClient+ClientSocketDisconnectTest— passBookieInitializationTest(40 tests) — pass