How can a replica recover from another replica but not the primary shard

Here is my scenario:

    1. create one index with 0 replica;
    1. merge this index to one segment;
    1. stop all the write operations and set the num of replica to 20;

The question is that the replicas can only be recovered from the primary shard on the step 3, which is limited by the network and CPU of the data node where the primary is allocated.
I wonder why replicas can not be recovered from another replicas while the replicas are stared.
And there are no write operations on the index.

Hi @chemboking

There is no theoretical reason why we couldn't optimise the recovery process to fetch files from replicas as well in theory and doing so has been discussed and may be implemented at some point. Implementing this isn't entirely trivial as it will add additional complexity to the recovery state machine which is one reason why this hasn't been worked on yet.

1 Like

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