Skip to content

[SPARK-53849][BUILD] Upgrade Netty to 4.2.6.Final#52552

Closed
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-53849
Closed

[SPARK-53849][BUILD] Upgrade Netty to 4.2.6.Final#52552
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-53849

Conversation

@dongjoon-hyun
Copy link
Copy Markdown
Member

@dongjoon-hyun dongjoon-hyun commented Oct 8, 2025

What changes were proposed in this pull request?

This PR aims to upgrade Netty to 4.2.6.Final as a part of Apache Spark 4.1.0 preparation.

This PR follows the official community migration guide.

Why are the changes needed?

Netty community recommends 4.2.

After a lot of work and many contributions from our OSS community we are thrilled to finally announce the release of netty 4.2.0.Final! Everyone using netty 4.1.x should be able to upgrade to 4.2.0.Final without any API breakage. The only new requirement is JDK8 or later (and JDK9+ for io_uring) and a more recent GLIBC version when using our native transports.

Does this PR introduce any user-facing change?

No behavior change.

How was this patch tested?

Pass the CIs.

Was this patch authored or co-authored using generative AI tooling?

No.

@dongjoon-hyun
Copy link
Copy Markdown
Member Author

All tests passed.

@dongjoon-hyun
Copy link
Copy Markdown
Member Author

Could you review this PR when you have some time, please, @peter-toth ?

Copy link
Copy Markdown
Member

@sarutak sarutak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM.

Comment thread pom.xml
-Djdk.reflect.useDirectMethodHandle=false
-Dio.netty.tryReflectionSetAccessible=true
-Dio.netty.allocator.type=pooled
-Dio.netty.handler.ssl.defaultEndpointVerificationAlgorithm=NONE
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand these changes are for keeping behavior like Netty 4.1 and before as the migration guides indicates.
https://github.com/netty/netty/wiki/Netty-4.2-Migration-Guide

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, correct. Thank you, @sarutak .

@dongjoon-hyun
Copy link
Copy Markdown
Member Author

Merged to master for Apache Spark 4.1.0-preview3.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-53849 branch October 9, 2025 06:58
Copy link
Copy Markdown
Contributor

@peter-toth peter-toth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Late LGTM.

@LuciferYang
Copy link
Copy Markdown
Contributor

late LGTM

TransportServer server = context.createServer();
int unreachablePort = server.getPort();
server.close();
Thread.sleep(1000);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dongjoon-hyun I also noticed this problem when testing versions prior to 4.2.6. There's a slight delay when the server executes the "close" operation. Have you conducted an in-depth investigation into the reason for this? If not, I will take some time to look into it when I'm available.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, it's a slight change and could be configurable via some Netty confs. Since we only use this close-and-reopen pattern to get an unreachable port number in our test cases, I didn't dig the further.

Thank you, @LuciferYang . If you hit any issue, let me know. I hope we can test this via Apache Spark 4.1.0-preview3 widely.

huangxiaopingRD pushed a commit to huangxiaopingRD/spark that referenced this pull request Nov 25, 2025
### What changes were proposed in this pull request?

This PR aims to upgrade `Netty` to `4.2.6.Final` as a part of `Apache Spark 4.1.0` preparation.

This PR follows the official community migration guide.
- https://github.com/netty/netty/wiki/Netty-4.2-Migration-Guide

### Why are the changes needed?

`Netty` community recommends `4.2`.

> After a lot of work and many contributions from our OSS community we are thrilled to finally announce the release of netty 4.2.0.Final! Everyone using netty 4.1.x should be able to upgrade to 4.2.0.Final without any API breakage. The only new requirement is JDK8 or later (and JDK9+ for io_uring) and a more recent GLIBC version when using our native transports.

- https://netty.io/news/2025/09/08/4-2-6.html
- https://netty.io/news/2025/09/03/4-2-5.html
- https://netty.io/news/2025/08/13/4-2-4.html
- https://netty.io/news/2025/07/15/4-2-3.html
- https://netty.io/news/2025/06/05/4-2-2.html
- https://netty.io/news/2025/05/06/4-2-1.html
- https://netty.io/news/2025/04/03/4-2-0.html

### Does this PR introduce _any_ user-facing change?

No behavior change.

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#52552 from dongjoon-hyun/SPARK-53849.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
SteNicholas added a commit to apache/celeborn that referenced this pull request Feb 27, 2026
### What changes were proposed in this pull request?

Bump Netty version from 4.1.118.Final to 4.2.10.Final, which follows the official community migration guide: [Netty-4.2-Migration-Guide](https://github.com/netty/netty/wiki/Netty-4.2-Migration-Guide).

### Why are the changes needed?

The Netty 4.2.10.Final version has been released, which netty version is 4.1.118.Final at present.

Backport:

- apache/spark#34881
- apache/spark#52552
- apache/spark#53499

### Does this PR resolve a correctness bug?

No.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

CI.

Closes #3596 from SteNicholas/CELEBORN-2258.

Authored-by: SteNicholas <programgeek@163.com>
Signed-off-by: SteNicholas <programgeek@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants