diff --git a/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java b/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java index d764311dbd9..1289fa352e5 100644 --- a/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java +++ b/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java @@ -96,7 +96,7 @@ public class TransportBulkAction extends HandledTransportAction listener) { final long startTime = System.currentTimeMillis(); - final AtomicArray responses = new AtomicArray(bulkRequest.requests.size()); + final AtomicArray responses = new AtomicArray<>(bulkRequest.requests.size()); if (autoCreateIndex.needToCheck()) { final Set indices = Sets.newHashSet(); @@ -125,7 +125,7 @@ public class TransportBulkAction extends HandledTransportAction() { + createIndexAction.execute(new CreateIndexRequest(index).cause("auto(bulk api)").masterNodeTimeout(bulkRequest.timeout()), new ActionListener() { @Override public void onResponse(CreateIndexResponse result) { if (counter.decrementAndGet() == 0) { @@ -145,7 +145,11 @@ public class TransportBulkAction extends HandledTransportAction