ES hangs connection when parent is not specified in bulk index, closes #641.
This commit is contained in:
parent
e953845058
commit
04f8b55686
|
@ -208,6 +208,20 @@ public class TransportBulkAction extends BaseAction<BulkRequest, BulkResponse> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (requestsByShard.isEmpty()) {
|
||||||
|
// all failures, no shards to process, send a response
|
||||||
|
if (bulkRequest.listenerThreaded()) {
|
||||||
|
threadPool.execute(new Runnable() {
|
||||||
|
@Override public void run() {
|
||||||
|
listener.onResponse(new BulkResponse(responses, System.currentTimeMillis() - startTime));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
listener.onResponse(new BulkResponse(responses, System.currentTimeMillis() - startTime));
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final AtomicInteger counter = new AtomicInteger(requestsByShard.size());
|
final AtomicInteger counter = new AtomicInteger(requestsByShard.size());
|
||||||
for (Map.Entry<ShardId, List<BulkItemRequest>> entry : requestsByShard.entrySet()) {
|
for (Map.Entry<ShardId, List<BulkItemRequest>> entry : requestsByShard.entrySet()) {
|
||||||
final ShardId shardId = entry.getKey();
|
final ShardId shardId = entry.getKey();
|
||||||
|
|
Loading…
Reference in New Issue