Skip to content

Commit 74a594d

Browse files
Remove redundant event loop shutdown check in Netty4TcpChannel (#96856)
This check isn't necessary any longer. We safely close all channels before shutting down the even loop groups so we can not run into the situation that a listener passed to `writeAndFlush` isn't completed. We also don't have this check on the http channel sending. -> remove the check that can cause a bug by double invoking the listener closes #95759
1 parent 52be52b commit 74a594d

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

modules/transport-netty4/src/main/java/org/elasticsearch/transport/netty4/Netty4TcpChannel.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import org.elasticsearch.core.IOUtils;
2121
import org.elasticsearch.core.Releasables;
2222
import org.elasticsearch.transport.TcpChannel;
23-
import org.elasticsearch.transport.TransportException;
2423

2524
import java.net.InetSocketAddress;
2625

@@ -163,10 +162,6 @@ public InetSocketAddress getRemoteAddress() {
163162
@Override
164163
public void sendMessage(BytesReference reference, ActionListener<Void> listener) {
165164
channel.writeAndFlush(Netty4Utils.toByteBuf(reference), addPromise(listener, channel));
166-
167-
if (channel.eventLoop().isShutdown()) {
168-
listener.onFailure(new TransportException("Cannot send message, event loop is shutting down."));
169-
}
170165
}
171166

172167
public Channel getNettyChannel() {

server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,6 @@ public void testScrollRewrittenToMatchNoDocs() {
671671
}
672672
}
673673

674-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/95759")
675674
public void testRestartDataNodesDuringScrollSearch() throws Exception {
676675
final String dataNode = internalCluster().startDataOnlyNode();
677676
createIndex("demo", indexSettings(1, 0).put("index.routing.allocation.include._name", dataNode).build());

0 commit comments

Comments
 (0)