2013-08-28 19:24:34 -04:00
|
|
|
[[modules-gateway]]
|
2020-06-01 12:40:15 -04:00
|
|
|
=== Local gateway settings
|
2015-06-22 17:49:45 -04:00
|
|
|
|
2020-06-01 12:40:15 -04:00
|
|
|
The local gateway stores the cluster state and shard data across full
|
2015-06-22 17:49:45 -04:00
|
|
|
cluster restarts.
|
|
|
|
|
2017-09-05 04:42:58 -04:00
|
|
|
The following _static_ settings, which must be set on every master node,
|
|
|
|
control how long a freshly elected master should wait before it tries to
|
2020-09-01 16:04:23 -04:00
|
|
|
recover the cluster state and the cluster's data.
|
2015-06-22 17:49:45 -04:00
|
|
|
|
2020-09-01 16:04:23 -04:00
|
|
|
NOTE: These settings only take effect on a full cluster restart.
|
2015-06-22 17:49:45 -04:00
|
|
|
|
2020-09-01 16:04:23 -04:00
|
|
|
`gateway.expected_nodes`::
|
|
|
|
(<<static-cluster-setting,Static>>)
|
|
|
|
deprecated:[7.7.0, This setting will be removed in 8.0. Use `gateway.expected_data_nodes` instead.]
|
|
|
|
Number of data or master nodes expected in the cluster.
|
|
|
|
Recovery of local shards begins when the expected number of
|
|
|
|
nodes join the cluster. Defaults to `0`.
|
2015-06-22 17:49:45 -04:00
|
|
|
|
|
|
|
`gateway.expected_master_nodes`::
|
2020-09-01 16:04:23 -04:00
|
|
|
(<<static-cluster-setting,Static>>)
|
|
|
|
deprecated:[7.7.0, This setting will be removed in 8.0. Use `gateway.expected_data_nodes` instead.]
|
|
|
|
Number of master nodes expected in the cluster.
|
|
|
|
Recovery of local shards begins when the expected number of
|
|
|
|
master nodes join the cluster. Defaults to `0`.
|
2015-06-22 17:49:45 -04:00
|
|
|
|
|
|
|
`gateway.expected_data_nodes`::
|
2020-09-01 16:04:23 -04:00
|
|
|
(<<static-cluster-setting,Static>>)
|
|
|
|
Number of data nodes expected in the cluster.
|
|
|
|
Recovery of local shards begins when the expected number of
|
|
|
|
data nodes join the cluster. Defaults to `0`.
|
2015-06-22 17:49:45 -04:00
|
|
|
|
|
|
|
`gateway.recover_after_time`::
|
2020-09-01 16:04:23 -04:00
|
|
|
(<<static-cluster-setting,Static>>)
|
|
|
|
If the expected number of nodes is not achieved, the recovery process waits
|
|
|
|
for the configured amount of time before trying to recover.
|
|
|
|
Defaults to `5m` if one of the `expected_nodes` settings is configured.
|
|
|
|
+
|
2015-06-22 17:49:45 -04:00
|
|
|
Once the `recover_after_time` duration has timed out, recovery will start
|
|
|
|
as long as the following conditions are met:
|
|
|
|
|
|
|
|
`gateway.recover_after_nodes`::
|
2020-09-01 16:04:23 -04:00
|
|
|
(<<static-cluster-setting,Static>>)
|
|
|
|
deprecated:[7.7.0, This setting will be removed in 8.0. Use `gateway.recover_after_data_nodes` instead.]
|
|
|
|
Recover as long as this many data or master nodes have joined the cluster.
|
2015-06-22 17:49:45 -04:00
|
|
|
|
|
|
|
`gateway.recover_after_master_nodes`::
|
2020-09-01 16:04:23 -04:00
|
|
|
(<<static-cluster-setting,Static>>)
|
|
|
|
deprecated:[7.7.0, This setting will be removed in 8.0. Use `gateway.recover_after_data_nodes` instead.]
|
|
|
|
Recover as long as this many master nodes have joined the cluster.
|
2015-06-22 17:49:45 -04:00
|
|
|
|
|
|
|
`gateway.recover_after_data_nodes`::
|
2020-09-01 16:04:23 -04:00
|
|
|
(<<static-cluster-setting,Static>>)
|
|
|
|
Recover as long as this many data nodes have joined the cluster.
|
2018-01-22 03:39:21 -05:00
|
|
|
|
2020-06-01 12:40:15 -04:00
|
|
|
[[dangling-indices]]
|
|
|
|
==== Dangling indices
|
2018-01-22 03:39:21 -05:00
|
|
|
|
2020-07-03 11:28:32 -04:00
|
|
|
When a node joins the cluster, if it finds any shards stored in its local data
|
|
|
|
directory that do not already exist in the cluster, it will consider those
|
|
|
|
shards to be "dangling". Importing dangling indices
|
|
|
|
into the cluster using `gateway.auto_import_dangling_indices` is not safe.
|
|
|
|
Instead, use the <<dangling-indices-api,Dangling indices API>>. Neither
|
|
|
|
mechanism provides any guarantees as to whether the imported data truly
|
|
|
|
represents the latest state of the data when the index was still part of
|
|
|
|
the cluster.
|
|
|
|
|
|
|
|
`gateway.auto_import_dangling_indices`::
|
|
|
|
|
|
|
|
deprecated:[7.9.0, This setting will be removed in 8.0. You should use the dedicated dangling indices API instead.]
|
|
|
|
Whether to automatically import dangling indices into the cluster
|
|
|
|
state, provided no indices already exist with the same name. Defaults
|
|
|
|
to `false`.
|
|
|
|
|
|
|
|
WARNING: The auto-import functionality was intended as a best effort to help users
|
|
|
|
who lose all master nodes. For example, if a new master node were to be
|
|
|
|
started which was unaware of the other indices in the cluster, adding the
|
|
|
|
old nodes would cause the old indices to be imported, instead of being
|
|
|
|
deleted. However there are several issues with automatic importing, and
|
|
|
|
its use is strongly discouraged in favour of the
|
|
|
|
<<dangling-indices-api,dedicated API>.
|
|
|
|
|
|
|
|
WARNING: Losing all master nodes is a situation that should be avoided at
|
|
|
|
all costs, as it puts your cluster's metadata and data at risk.
|