Yes, this is the syntax I suggest.
Timeout of "0s" is a glitch in the bulk operations, the replica shard level
operations use TransportRequestOptions (transportOptions in
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java?source=c#L685
for timeout, but the bulk request timeout is not propagated into this
class, it's just a null value, which means, extra timeout handling is not
set up.
A fix would be to add the timeout to TransportRequestOptions in BulkAction
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/bulk/BulkAction.java#L49
Jörg
On Tue, Jul 29, 2014 at 11:25 PM, Ashish Mishra laughingbuddha@gmail.com
wrote:
Just to be sure I understand -- are you suggesting the following syntax:
curl -XPOST 'http://localhost:9200/test/type1/_bulk?replication=async&timeout=5m'
-d '
{ "index" : { "_id" : "i1", "version": 3, "version_type": "external" } }
{ "fields": "values etc." }
'For my use case, version_type is always "external" for all documents in
the request. But I get the motivation for specifying it per-doc.You said that timeout per-doc is ignored in bulk mode. So the
Elasticsearch default timeout, i.e. [1m] should have been applied to my
original requests.
Do you know why a [0s] timeout was applied instead? This was from a
response:{"index":"test","_type":"type1","_id":"123","status":503,"error":"
UnavailableShardsException[[test][98] [3] shardIt, [3] active : Timeout
waiting for [0s], request: org.elasticsearch.action.bulk.
BulkShardRequest@36d185a1]"}
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoE5fv_1rZmCEpxgEmj%2B2qoisau5e3fpQD0sLimzMmaKXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.