# Write failure handling in elasticsearch

**URL:** <https://discuss.elastic.co/t/write-failure-handling-in-elasticsearch/63270>\
**Category:** Elasticsearch\
**Created:** [October 18, 2016, 9:22am UTC](https://discuss.elastic.co/t/write-failure-handling-in-elasticsearch/63270 "2016-10-18T09:22:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikas\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_kumar/32/12558_2.png) [@Vikas\_Kumar](https://discuss.elastic.co/u/Vikas_Kumar)\
**Post date:** [October 18, 2016, 9:22am UTC](https://discuss.elastic.co/t/write-failure-handling-in-elasticsearch/63270/1 "2016-10-18T09:22:50Z")

</div>

How are write failures handled in elasticsearch, particularly cases where a write op succeeds on primary, but one or more replicas fail to respond (due to network or any other issue)?

Will the write/update stay on replicas where it succeeded? Even in cases where quorum is not met? How will it impact subsequent searches?

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [October 19, 2016, 1:22pm UTC](https://discuss.elastic.co/t/write-failure-handling-in-elasticsearch/63270/2 "2016-10-19T13:22:51Z")

</div>

Hi @Vikas_Kumar,

as you mention `quorum`, I guess you refer to the [`action.write_consistency` setting](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-index_.html#index-consistency). `quorum` is the default, so if less than a quorum of the replicas succeeds, the write is not successful (see a few more details in the [Definitive Guide](https://www.elastic.co/guide/en/elasticsearch/guide/2.x/distrib-write.html)). However, note that this is actually just a pre-check before the actual replication takes place.

We will keep writes on replicas that succeed and get a new replica node assignment from the master if one of the replicas fails. After a new replica node is assigned, the shard in question is synced to the new replica.

However, consistency in distributed systems is a hard problem and we document known edge cases and Elasticsearch's behavior / the status of our fixes on the [resiliency page](https://www.elastic.co/guide/en/elasticsearch/resiliency/current/index.html).

Daniel

---

<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 5, 2017, 10:11pm UTC](https://discuss.elastic.co/t/write-failure-handling-in-elasticsearch/63270/3 "2017-07-05T22:11:14Z")

</div>


