How Replica from one node to another will move?

I have a 3 node cluster with 2 master eligible and all are data node & ingest node.
Setting is 1 Primary Shard and 1 Replica shard.
I have one index "nginx-2019.09"

For example Node "A" is master node and haves a Primary Shard of index. Node "B" has a Replica of the index. Node "C" is idle as of now.

Suddenly Node "B" went down in the cluster, Master node decides to use Node "C" as a replica for the index. Now Node "C" have whole index date up to date.

After few days back Node "B" joins the cluster. My questions are

  1. Now again Node B will become a Replica or Node C will continue as replica?
  2. If Node C continues as replica, What happens to the replica data which Node B has?
  3. Else If Node B elected as new replica, all the data from primary shard gets copied to Node B and Node C data will be deleted?

Kindly clarify my doubt

If you have a three-node cluster then all three nodes should be master-eligible. If you have two master-eligible nodes then your cluster is not fault tolerant.

Node C will continue as the replica.

Node B will ensure that the data is safely stored elsewhere in the cluster and will then delete its own stale copy to free up the disk space for something else.

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