# Should GatewayAllocator force allocate replicas for node/process restart cases?

**URL:** <https://discuss.elastic.co/t/should-gatewayallocator-force-allocate-replicas-for-node-process-restart-cases/232876>\
**Category:** Elasticsearch\
**Created:** [May 15, 2020, 7:32pm UTC](https://discuss.elastic.co/t/should-gatewayallocator-force-allocate-replicas-for-node-process-restart-cases/232876 "2020-05-15T19:32:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vigyas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigyas/32/40226_2.png) [@vigyas](https://discuss.elastic.co/u/vigyas)\
**Post date:** [May 15, 2020, 7:32pm UTC](https://discuss.elastic.co/t/should-gatewayallocator-force-allocate-replicas-for-node-process-restart-cases/232876/1 "2020-05-15T19:32:09Z")

</div>

Today, we can exclude certain nodes from allocation using `FilterDecider` settings, which is a way to decommission nodes on a rack, or with an attribute.

If ES process restarts on such a node, the primaries get assigned because `GatewayAllocator` can call `canForceAllocatePrimary()` and get a `YES` decision when possible.

However, replica shards have no such mechanism. This causes yellow clusters and makes it vulnerable to data loss due to under-replication. Since primaries are already being moved out of the shard, the new replica recovery is often throttled due to that node's outgoing recovery limits; which causes cluster to stay yellow for some time (increasing window of low durability).

Should ES have a mechanism similar to force allocating primaries, for allocating replica shards as well. This would only apply to in-sync shard copies, and only for nodes that were unassigned due to `node left` or `cluster recovered`.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 12, 2020, 7:32pm UTC](https://discuss.elastic.co/t/should-gatewayallocator-force-allocate-replicas-for-node-process-restart-cases/232876/2 "2020-06-12T19:32:10Z")

</div>

Closed on June 12, 2020, 7:32pm UTC

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