mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 21:48:39 +00:00
The `recovery_after_time` tells the gateway to wait before starting recovery from disk. The goal here is to allow for more nodes to join the cluster and thus not start potentially unneeded replications. The `expectedNodes` setting (and friends) tells the gateway when it can start recovering even if the `recover_after_time` has not yet elapsed. However, `expectedNodes` is useless if one doesn't set `recovery_after_time`. This commit changes that by setting a sensible default of 5m for `recover_after_time` *if* a `expectedNodes` setting is present. Closes #6742
57 lines
1.9 KiB
Plaintext
57 lines
1.9 KiB
Plaintext
[[modules-gateway-local]]
|
|
=== Local Gateway
|
|
|
|
The local gateway allows for recovery of the full cluster state and
|
|
indices from the local storage of each node, and does not require a
|
|
common node level shared storage.
|
|
|
|
Note, different from shared gateway types, the persistency to the local
|
|
gateway is *not* done in an async manner. Once an operation is
|
|
performed, the data is there for the local gateway to recover it in case
|
|
of full cluster failure.
|
|
|
|
It is important to configure the `gateway.recover_after_nodes` setting
|
|
to include most of the expected nodes to be started after a full cluster
|
|
restart. This will insure that the latest cluster state is recovered.
|
|
For example:
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
gateway:
|
|
recover_after_nodes: 3
|
|
expected_nodes: 5
|
|
--------------------------------------------------
|
|
|
|
[float]
|
|
==== Dangling indices
|
|
|
|
When a node joins the cluster, any shards/indices stored in its local `data/`
|
|
directory which do not already exist in the cluster will be imported into the
|
|
cluster by default. This functionality has two purposes:
|
|
|
|
1. If a new master node is started which is unaware of the other indices in
|
|
the cluster, adding the old nodes will cause the old indices to be
|
|
imported, instead of being deleted.
|
|
|
|
2. An old index can be added to an existing cluster by copying it to the
|
|
`data/` directory of a new node, starting the node and letting it join
|
|
the cluster. Once the index has been replicated to other nodes in the
|
|
cluster, the new node can be shut down and removed.
|
|
|
|
The import of dangling indices can be controlled with the
|
|
`gateway.local.auto_import_dangled` which accepts:
|
|
|
|
[horizontal]
|
|
`yes`::
|
|
|
|
Import dangling indices into the cluster (default).
|
|
|
|
`close`::
|
|
|
|
Import dangling indices into the cluster state, but leave them closed.
|
|
|
|
`no`::
|
|
|
|
Delete dangling indices after `gateway.local.dangling_timeout`, which
|
|
defaults to 2 hours.
|