Skip to content

Commit

Permalink
Improve allocation-disabling instructions
Browse files Browse the repository at this point in the history
Clarify the “one minute” in the instructions to disable the shard allocation
when doing maintenance to say that it is configurable.

Add a note about making sure that no rebalancing occurs until the maintenance
is complete.

Relates elastic#19739.
  • Loading branch information
DaveCTurner committed Apr 30, 2018
1 parent 752ba2f commit 9e8c470
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions docs/reference/upgrade/disable-shard-alloc.asciidoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@

When you shut down a node, the allocation process waits for one minute
before starting to replicate the shards on that node to other nodes
in the cluster, causing a lot of wasted I/O. You can avoid racing the clock
by disabling allocation before shutting down the node:
When you shut down a 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 disabling
allocation before shutting down the node:

[source,js]
--------------------------------------------------
Expand All @@ -14,4 +16,14 @@ PUT _cluster/settings
}
--------------------------------------------------
// CONSOLE
// TEST[skip:indexes don't assign]
// TEST[skip:indexes don't assign]

Additionally, the allocation process attempts to keep the shards balanced
across the cluster by performing rebalancing, moving shards between nodes. This
involves I/O that is also unnecessary if the shut-down node will shortly
return, so it is preferable for the cluster not to attempt to perform any
rebalancing until the maintenance is complete. This is the default behaviour,
but can be changed using the `cluster.routing.allocation.allow_rebalance`
setting. Make sure that this setting is unset, or set to the default value of
`indices_all_active`, before continuing.

0 comments on commit 9e8c470

Please sign in to comment.