elasticsearch/docs/reference/upgrade/disable-shard-alloc.asciidoc
Henning Andersen 6fbd2601df
[DOCS] Disable shard allocation - data nodes only (#72265)
When doing a rolling restart we recommend disabling shard allocation to
avoid unnecessary recoveries. However, this advise is unnecessary or
even harmful when restarting nodes that do not carry any data like a
pure ML node.
2021-04-27 11:19:03 +02:00

19 lines
734 B
Text

When you shut down a data node, the allocation process waits for
`index.unassigned.node_left.delayed_timeout` (by default, one minute) before
starting to replicate the shards on that node to other nodes in the cluster,
which can involve a lot of I/O. Since the node is shortly going to be
restarted, this I/O is unnecessary. You can avoid racing the clock by
<<cluster-routing-allocation-enable,disabling allocation>> of replicas before
shutting down <<data-node,data nodes>>:
[source,console]
--------------------------------------------------
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "primaries"
}
}
--------------------------------------------------
// TEST[skip:indexes don't assign]