Browse Source

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
Tim Brooks 1 year ago
parent
commit
46b069621e

+ 1 - 1
server/src/main/java/org/elasticsearch/action/bulk/IncrementalBulkService.java

@@ -194,7 +194,7 @@ public class IncrementalBulkService {
                         releasables.clear();
                         // We do not need to set this back to false as this will be the last request.
                         bulkInProgress = true;
-                        client.bulk(bulkRequest, ActionListener.runAfter(new ActionListener<>() {
+                        client.bulk(bulkRequest, ActionListener.runBefore(new ActionListener<>() {
 
                             private final boolean isFirstRequest = incrementalRequestSubmitted == false;