Skip to content

Commit 428b903

Browse files
Marcelo VanzinHyukjinKwon
Marcelo Vanzin
authored andcommitted
[SPARK-24029][CORE] Follow up: set SO_REUSEADDR on the server socket.
"childOption" is for the remote connections, not for the server socket that actually listens for incoming connections. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #21132 from vanzin/SPARK-24029.2.
1 parent c8f3ac6 commit 428b903

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/network-common/src/main/java/org/apache/spark/network/server/TransportServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ private void init(String hostToBind, int portToBind) {
9999
.group(bossGroup, workerGroup)
100100
.channel(NettyUtils.getServerChannelClass(ioMode))
101101
.option(ChannelOption.ALLOCATOR, allocator)
102-
.childOption(ChannelOption.ALLOCATOR, allocator)
103-
.childOption(ChannelOption.SO_REUSEADDR, !SystemUtils.IS_OS_WINDOWS);
102+
.option(ChannelOption.SO_REUSEADDR, !SystemUtils.IS_OS_WINDOWS)
103+
.childOption(ChannelOption.ALLOCATOR, allocator);
104104

105105
this.metrics = new NettyMemoryMetrics(
106106
allocator, conf.getModuleName() + "-server", conf);

0 commit comments

Comments
 (0)