diff --git a/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java b/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java index 7563cb505f34e..b7269f718a02e 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java @@ -369,13 +369,21 @@ protected void doInternalExecute(Task task, BulkRequest bulkRequest, String exec } // Step 3: create all the indices that are missing, if there are any missing. start the bulk after all the creates come back. - indexData(task, bulkRequest, executorName, listener, autoCreateIndices, indicesThatCannotBeCreated, startTime); + createMissingIndicesAndindexData( + task, + bulkRequest, + executorName, + listener, + autoCreateIndices, + indicesThatCannotBeCreated, + startTime + ); } /* * This method is responsible for creating any missing indices and indexing the data in the BulkRequest */ - protected void indexData( + protected void createMissingIndicesAndindexData( Task task, BulkRequest bulkRequest, String executorName, diff --git a/server/src/main/java/org/elasticsearch/action/bulk/TransportSimulateBulkAction.java b/server/src/main/java/org/elasticsearch/action/bulk/TransportSimulateBulkAction.java index 1cded75cceaa5..aa9ae619e49bf 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/TransportSimulateBulkAction.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/TransportSimulateBulkAction.java @@ -64,7 +64,7 @@ public TransportSimulateBulkAction( * request gets a corresponding CREATE response, using information from the request. */ @Override - protected void indexData( + protected void createMissingIndicesAndindexData( Task task, BulkRequest bulkRequest, String executorName, diff --git a/server/src/test/java/org/elasticsearch/action/bulk/TransportSimulateBulkActionTests.java b/server/src/test/java/org/elasticsearch/action/bulk/TransportSimulateBulkActionTests.java index ed53e1b548d85..c88d1bee1fa00 100644 --- a/server/src/test/java/org/elasticsearch/action/bulk/TransportSimulateBulkActionTests.java +++ b/server/src/test/java/org/elasticsearch/action/bulk/TransportSimulateBulkActionTests.java @@ -192,7 +192,7 @@ public void onFailure(Exception e) { Set autoCreateIndices = Set.of(); // unused Map indicesThatCannotBeCreated = Map.of(); // unused long startTime = 0; - bulkAction.indexData( + bulkAction.createMissingIndicesAndindexData( task, bulkRequest, randomAlphaOfLength(10),