Skip to content

Commit 8f24f43

Browse files
authored
Fix issue with releasing resources in bulk tests (#114186)
A recent commit incidentally changed a release resources call from doBefore to doAfter. Several tests depending on resources being released synchronously which requires doBefore. Closes #114181 Closes #114182
1 parent 7987c01 commit 8f24f43

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,6 @@ tests:
345345
- class: org.elasticsearch.xpack.inference.InferenceCrudIT
346346
method: testGet
347347
issue: https://github.com/elastic/elasticsearch/issues/114135
348-
- class: org.elasticsearch.action.bulk.IncrementalBulkIT
349-
method: testIncrementalBulkHighWatermarkBackOff
350-
issue: https://github.com/elastic/elasticsearch/issues/114073
351348
- class: org.elasticsearch.xpack.esql.expression.function.aggregate.AvgTests
352349
method: "testFold {TestCase=<double> #7}"
353350
issue: https://github.com/elastic/elasticsearch/issues/114175

server/src/main/java/org/elasticsearch/action/bulk/IncrementalBulkService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public void lastItems(List<DocWriteRequest<?>> items, Releasable releasable, Act
194194
releasables.clear();
195195
// We do not need to set this back to false as this will be the last request.
196196
bulkInProgress = true;
197-
client.bulk(bulkRequest, ActionListener.runAfter(new ActionListener<>() {
197+
client.bulk(bulkRequest, ActionListener.runBefore(new ActionListener<>() {
198198

199199
private final boolean isFirstRequest = incrementalRequestSubmitted == false;
200200

0 commit comments

Comments
 (0)