Restarting ES on a node

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.

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 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.

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