Hiya

OK I see where the confusion is coming in.  I used the word asynchronously
in slightly different contexts there.  I will try to reword in the
Definitive Guide.

Replication is sync by default, in other words: the primary waits for
indexing to happen on the replica before it returns to the user.  That
said, lots of these processes happen at the same time, so sending the
document to the replica is asynchronous.  It doesn't send a change then
wait for the response before sending the next one.  This all happens in
parallel.

Does that make it clearer?


On 7 September 2014 03:38, daa qqu <daa...@gmail.com> wrote:

> What is the default replication policy in Elasticsearch?  Does it push
> changes to replicas asynchronously or synchronously? Or does it use
> different mode with different operations.
> asynchronous replication
> <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-index_.html#index-replication>
>
> By default, the index operation only returns after all shards within the
> replication group have indexed the document (sync replication).
> optimistic concurrency control
> <http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/optimistic-concurrency-control.html#optimistic-concurrency-control>
> Elasticsearch is distributed. When documents are created, updated or
> deleted, the new version of the document has to be replicated to other
> nodes in the cluster. Elasticsearch is also asynchronous and concurrent
>
>
>
> This book Ealsticsearch Definitive Guide, states under 'Creating, indexing
> and deleting' that "...default value for replication is synchronous".  When
> discussing 'update' API it is stated that "...these changes are forwarded
> to the replica shards asynchronously...."
>
>
>
>
> https://github.com/elasticsearch/elasticsearch-definitive-guide/blob/master/040_Distributed_CRUD/15_Create_index_delete.asciidoc
> replication
>
> *** The default value for replication is sync. This causes the primary
> shard to wait for successful responses from the replica shards before
> returning.
>
>
> https://github.com/elasticsearch/elasticsearch-definitive-guide/blob/master/040_Distributed_CRUD/25_Partial_updates.asciidoc
>
>
> Document based replication
>
> When a primary shard forwards changes to its replica shards, it doesn’t
> forward the update request. Instead it forwards the new version of the full
> document. ***Remember that these changes are forwarded to the replica
> shards asynchronously and there is no guarantee that they will arrive in
> the same order that they were sent.
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CAO4Z2jCOfD8Mp8YL9WbPmf9aODX4D6fORZ-pSjhxFx1qweQsXA%40mail.gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/CAO4Z2jCOfD8Mp8YL9WbPmf9aODX4D6fORZ-pSjhxFx1qweQsXA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAPt3XKQVHAYL9aarQK%2Bf5cZHu3c7LFJ5qEGX%3DrDjShPU%2B3fSvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to