when shard become very large, restart one cluster will waste too much time,
I know the primary shard become started is very fast.
but the cluster become green from yellow is very slow, become replica shard need recovery:
Especially the first phase of recovery.
Sometimes we need fast recovery services, not too concerned about data consistency。
I recommend adding a configuration item: “indices.recovery.fast”, which can be dynamically modified。
Then we can skip first phase of recovery~~
org.elasticsearch.indices.recovery.RecoverySourceHandler
public void phase1(final SnapshotIndexCommit snapshot) throws ElasticsearchException{
.....
//add one fast recovery branch
if (recoverySettings.fast() && !request.markAsRelocated()) {
......
} else if (recoverWithSyncId) {
......
} else {
......
}