Skip to content

Commit d566870

Browse files
authored
Merge branch 'main' into empty-chunked-encoding
2 parents f0e84d8 + c82f6bc commit d566870

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

modules/transport-netty4/src/internalClusterTest/java/org/elasticsearch/transport/netty4/ESLoggingHandlerIT.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
package org.elasticsearch.transport.netty4;
1111

1212
import org.apache.logging.log4j.Level;
13+
import org.apache.logging.log4j.core.LogEvent;
1314
import org.elasticsearch.ESNetty4IntegTestCase;
1415
import org.elasticsearch.core.TimeValue;
1516
import org.elasticsearch.test.ESIntegTestCase;
1617
import org.elasticsearch.test.MockLog;
1718
import org.elasticsearch.test.junit.annotations.TestLogging;
19+
import org.elasticsearch.transport.NodeDisconnectedException;
1820
import org.elasticsearch.transport.TcpTransport;
1921
import org.elasticsearch.transport.TransportLogger;
2022

@@ -117,7 +119,15 @@ public void testExceptionalDisconnectLogging() throws Exception {
117119
TcpTransport.class.getCanonicalName(),
118120
Level.DEBUG,
119121
".*closed transport connection \\[[1-9][0-9]*\\] to .* with age \\[[0-9]+ms\\], exception:.*"
120-
)
122+
) {
123+
@Override
124+
public void match(LogEvent event) {
125+
if (event.getThrown() instanceof NodeDisconnectedException nodeDisconnectedException
126+
&& nodeDisconnectedException.getMessage().contains("closed exceptionally: Netty4TcpChannel{")) {
127+
super.match(event);
128+
}
129+
}
130+
}
121131
);
122132

123133
final String nodeName = internalCluster().startNode();

muted-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,9 @@ tests:
543543
- class: org.elasticsearch.xpack.ml.integration.ClassificationIT
544544
method: testWithCustomFeatureProcessors
545545
issue: https://github.com/elastic/elasticsearch/issues/134001
546+
- class: org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT
547+
method: testRateGroupBySubset
548+
issue: https://github.com/elastic/elasticsearch/issues/134019
546549

547550
# Examples:
548551
#

server/src/main/java/org/elasticsearch/transport/TcpTransport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,15 +1134,15 @@ public void onResponse(Void v) {
11341134
nodeChannels.channels.forEach(ch -> {
11351135
// Mark the channel init time
11361136
ch.getChannelStats().markAccessed(relativeMillisTime);
1137-
ch.addCloseListener(new ActionListener<Void>() {
1137+
ch.addCloseListener(new ActionListener<>() {
11381138
@Override
11391139
public void onResponse(Void ignored) {
11401140
nodeChannels.close();
11411141
}
11421142

11431143
@Override
11441144
public void onFailure(Exception e) {
1145-
nodeChannels.closeAndFail(e);
1145+
nodeChannels.closeAndFail(new NodeDisconnectedException(node, "closed exceptionally: " + ch, null, e));
11461146
}
11471147
});
11481148
});

0 commit comments

Comments
 (0)