Skip to content

Commit 4e0e36b

Browse files
authored
Relax http stream.next closure assertion (#120480)
1 parent 15a83a0 commit 4e0e36b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpRequestBodyStream.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,15 @@ public void addTracingHandler(ChunkHandler chunkHandler) {
7575

7676
@Override
7777
public void next() {
78-
assert closing == false : "cannot request next chunk on closing stream";
7978
assert handler != null : "handler must be set before requesting next chunk";
8079
requestContext = threadContext.newStoredContext();
8180
channel.eventLoop().submit(() -> {
8281
activityTracker.startActivity();
8382
requested = true;
8483
try {
84+
if (closing) {
85+
return;
86+
}
8587
if (buf == null) {
8688
channel.read();
8789
} else {

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,6 @@ tests:
241241
- class: org.elasticsearch.search.ccs.CrossClusterIT
242242
method: testCancel
243243
issue: https://github.com/elastic/elasticsearch/issues/108061
244-
- class: org.elasticsearch.http.netty4.Netty4IncrementalRequestHandlingIT
245-
method: testOversizedChunkedEncoding
246-
issue: https://github.com/elastic/elasticsearch/issues/120444
247244
- class: org.elasticsearch.xpack.logsdb.seqno.RetentionLeaseRestIT
248245
issue: https://github.com/elastic/elasticsearch/issues/120434
249246
- class: org.elasticsearch.entitlement.qa.EntitlementsAllowedIT

0 commit comments

Comments
 (0)