# Restarting ES on a node

**URL:** <https://discuss.elastic.co/t/restarting-es-on-a-node/124638>\
**Category:** Elasticsearch\
**Created:** [March 19, 2018, 8:15pm UTC](https://discuss.elastic.co/t/restarting-es-on-a-node/124638 "2018-03-19T20:15:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivam.dixit](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@shivam.dixit](https://discuss.elastic.co/u/shivam.dixit)\
**Post date:** [March 19, 2018, 8:15pm UTC](https://discuss.elastic.co/t/restarting-es-on-a-node/124638/1 "2018-03-19T20:15:02Z")

</div>

[https://www.elastic.co/guide/en/elasticsearch/guide/current/distrib-write.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/distrib-write.html)

Consider a cluster as explained above. The default "write" implementation is to replicate the change to the primary and replica shards in sync (before returning a success status to the client).

Let's say we are updating data constantly for index 0 which has replica shards on both Node 1 and Node 2.  
As per my understanding, updates will be happening in sync in the primary and replica shards. Now let's say one of the node (Node 2) goes down and then comes back up immediately (but some of the updates were missed). In this case, will the updates succeed by only updating the left-over shards ? But does this mean that the shards will be inconsistent once the node comes back up ?  
Or will the updates start failing all together since one replica is missing.

I am assuming there is a third case to this. As soon as the master senses that a node has gone down, it will start replication in another node. But what happens to the shard lying idle in Node 2. Does it become eligible to be tagged as 'dirty data' and hence eligible for deletion? But what happens to writes which were done before the master could sense that there is a node down? I know I am asking a lot of questions (with fallbacks), hence looking for a detailed response.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 20, 2018, 8:42am UTC](https://discuss.elastic.co/t/restarting-es-on-a-node/124638/2 "2018-03-20T08:42:59Z")

</div>

In older versions of Elasticsearch the shard that went offline would be marked as invalid as soon as a write did not succeed on it, and the whole shard would be replaced once it came back up. With the [introduction of sequence IDs](https://www.elastic.co/blog/elasticsearch-sequence-ids-6-0) in Elasticsearch 6.0, this process has been made much more efficient, and it is now possible to recover just missing operations instead of replacing the whole shard as long as the node has not been down too long.

---

<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:** [April 17, 2018, 8:43am UTC](https://discuss.elastic.co/t/restarting-es-on-a-node/124638/3 "2018-04-17T08:43:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
