# Quorum write + sync replication: guarantees

**URL:** <https://discuss.elastic.co/t/quorum-write-sync-replication-guarantees/18066>\
**Category:** Elasticsearch\
**Created:** [June 12, 2014, 12:39pm UTC](https://discuss.elastic.co/t/quorum-write-sync-replication-guarantees/18066 "2014-06-12T12:39:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shikhar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shikhar/32/1152_2.png) [@shikhar](https://discuss.elastic.co/u/shikhar)\
**Post date:** [June 12, 2014, 12:39pm UTC](https://discuss.elastic.co/t/quorum-write-sync-replication-guarantees/18066/1 "2014-06-12T12:39:30Z")

</div>

I have been digging into the consistency guarantees provided by  
ElasticSearch and I am a bit confused by looking at the code. It seems like  
the only time we look at how many replicas the write succeeded on is prior  
to issuing the write  
[https://github.com/elasticsearch/elasticsearch/blob/20278f491ac3e62be30544a862344a9b8b1f647c/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java#L398-L418](https://github.com/elasticsearch/elasticsearch/blob/20278f491ac3e62be30544a862344a9b8b1f647c/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java#L398-L418)  
[1].

So I want to ask a question which should hopefully have a clear answer.

- write consistency level is quorum
- replication type is sync
- a write is issued. it succeeds on primary but not on a quorum of all the  
shards (primary shard & replicas). will this result in a failure response?

If yes, I would love to see some corroboration!

Cheers,

Shikhar

[1] related issue: definition of quorum in ES code is off. github issue  
[https://github.com/elasticsearch/elasticsearch/issues/6482](https://github.com/elasticsearch/elasticsearch/issues/6482).

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHWG4DP-mMc-UoQ-RYMB1iA9770v-3QE3FxzTdEUoFxKz\_N-sQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHWG4DP-mMc-UoQ-RYMB1iA9770v-3QE3FxzTdEUoFxKz_N-sQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![shikhar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shikhar/32/1152_2.png) [@shikhar](https://discuss.elastic.co/u/shikhar)\
**Post date:** [June 12, 2014, 12:50pm UTC](https://discuss.elastic.co/t/quorum-write-sync-replication-guarantees/18066/2 "2014-06-12T12:50:05Z")

</div>

On Thu, Jun 12, 2014 at 6:09 PM, shikhar [shikhar@schmizz.net](mailto:shikhar@schmizz.net) wrote:

> It seems like the only time we look at how many replicas the write  
> succeeded on is prior to issuing the write  
> [https://github.com/elasticsearch/elasticsearch/blob/20278f491ac3e62be30544a862344a9b8b1f647c/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java#L398-L418](https://github.com/elasticsearch/elasticsearch/blob/20278f491ac3e62be30544a862344a9b8b1f647c/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java#L398-L418)  
> [1].

I meant "how many replicas the write could succeed on"... of course how  
many it actually succeded on can only happen after the fact 🙂

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHWG4DMkhJ59ALK4ZRS%2BQkDYpwhNPZ%3D\_AXTNgf6prGnyHLGwDQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHWG4DMkhJ59ALK4ZRS%2BQkDYpwhNPZ%3D_AXTNgf6prGnyHLGwDQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:23am UTC](https://discuss.elastic.co/t/quorum-write-sync-replication-guarantees/18066/3 "2017-07-06T01:23:02Z")

</div>


