Relationship between action.replication_type and action.write_consistency


(Oli McCormack) #1

Hi there,

The action.replication_type=sync option suggests to me that *all *shards
(primary + replicas) must be written to before an index operation returns.
However, my reading of action.write_consistency suggests that it actually
dictates how many shards need to be present for a write/index to occur.

If I have the following settings:
shards: 1 primary + 2 replicas
action.replication_type: sync
action.write_consistency: quorum

What is the result? Will indexing success on the primary and a single
replica return a successful write operation to me?

Thanks very much for any help. I've included some related docs/links that
I've been through below, but have yet to be conclusive on this!

  • oli

Some useful related links:
Notes on these settings in the docshttp://www.elasticsearch.org/guide/reference/api/index_/
Get consistency and quorum from the listhttps://groups.google.com/forum/#!searchin/elasticsearch/action.replication_type/elasticsearch/YbaM-TPhZMg/zppsQBuxbV8J
Video from Shay discussing the nature of push replication for shardshttp://vimeo.com/26710663

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(Oli McCormack) #2

I got an answer to this question, so for anyone else that comes across it:

Setting action.replication_type: sync means that success will be returned
once action.write_consistency is achieved. In the following scenario:

shards: 1 primary + 2 replicas
action.replication_type: sync
action.write_consistency: quorum

A sync indexing operation will succeed once quorum (a primary and a single
replica) have been written to.

  • oli

On Tue, Aug 13, 2013 at 4:41 AM, Oli oli@climate.com wrote:

Hi there,

The action.replication_type=sync option suggests to me that *all *shards
(primary + replicas) must be written to before an index operation returns.
However, my reading of action.write_consistency suggests that it
actually dictates how many shards need to be present for a write/index to
occur.

If I have the following settings:
shards: 1 primary + 2 replicas
action.replication_type: sync
action.write_consistency: quorum

What is the result? Will indexing success on the primary and a single
replica return a successful write operation to me?

Thanks very much for any help. I've included some related docs/links that
I've been through below, but have yet to be conclusive on this!

  • oli

Some useful related links:
Notes on these settings in the docshttp://www.elasticsearch.org/guide/reference/api/index_/
Get consistency and quorum from the listhttps://groups.google.com/forum/#!searchin/elasticsearch/action.replication_type/elasticsearch/YbaM-TPhZMg/zppsQBuxbV8J
Video from Shay discussing the nature of push replication for shardshttp://vimeo.com/26710663

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3