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.