Skip to content

Commit 46b0696

Browse files
authored
Fix issue with releasing resources in bulk tests (#114186) (#114258)
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 3ee0608 commit 46b0696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)