Browse Source

Use correct system index bulk executor (#106150)

In one place we would always use the Write threadpool, which could let
write thread pool queuing lead to increased system index write latency.
Henning Andersen 1 year ago
parent
commit
2c24abeab0

+ 5 - 0
docs/changelog/106150.yaml

@@ -0,0 +1,5 @@
+pr: 106150
+summary: Use correct system index bulk executor
+area: CRUD
+type: bug
+issues: []

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

@@ -291,7 +291,7 @@ public class TransportBulkAction extends HandledTransportAction<BulkRequest, Bul
     }
 
     private void forkAndExecute(Task task, BulkRequest bulkRequest, String executorName, ActionListener<BulkResponse> releasingListener) {
-        threadPool.executor(Names.WRITE).execute(new ActionRunnable<>(releasingListener) {
+        threadPool.executor(executorName).execute(new ActionRunnable<>(releasingListener) {
             @Override
             protected void doRun() {
                 doInternalExecute(task, bulkRequest, executorName, releasingListener);