OpenSearch/docs/reference
Yannick Welsch 22ba759e1f
Move metadata storage to Lucene (#50928)
* Move metadata storage to Lucene (#50907)

Today we split the on-disk cluster metadata across many files: one file for the metadata of each
index, plus one file for the global metadata and another for the manifest. Most metadata updates
only touch a few of these files, but some must write them all. If a node holds a large number of
indices then it's possible its disks are not fast enough to process a complete metadata update before timing out. In severe cases affecting master-eligible nodes this can prevent an election
from succeeding.

This commit uses Lucene as a metadata storage for the cluster state, and is a squashed version
of the following PRs that were targeting a feature branch:

* Introduce Lucene-based metadata persistence (#48733)

This commit introduces `LucenePersistedState` which master-eligible nodes
can use to persist the cluster metadata in a Lucene index rather than in
many separate files.

Relates #48701

* Remove per-index metadata without assigned shards (#49234)

Today on master-eligible nodes we maintain per-index metadata files for every
index. However, we also keep this metadata in the `LucenePersistedState`, and
only use the per-index metadata files for importing dangling indices. However
there is no point in importing a dangling index without any shard data, so we
do not need to maintain these extra files any more.

This commit removes per-index metadata files from nodes which do not hold any
shards of those indices.

Relates #48701

* Use Lucene exclusively for metadata storage (#50144)

This moves metadata persistence to Lucene for all node types. It also reenables BWC and adds
an interoperability layer for upgrades from prior versions.

This commit disables a number of tests related to dangling indices and command-line tools.
Those will be addressed in follow-ups.

Relates #48701

* Add command-line tool support for Lucene-based metadata storage (#50179)

Adds command-line tool support (unsafe-bootstrap, detach-cluster, repurpose, & shard
commands) for the Lucene-based metadata storage.

Relates #48701

* Use single directory for metadata (#50639)

Earlier PRs for #48701 introduced a separate directory for the cluster state. This is not needed
though, and introduces an additional unnecessary cognitive burden to the users.

Co-Authored-By: David Turner <david.turner@elastic.co>

* Add async dangling indices support (#50642)

Adds support for writing out dangling indices in an asynchronous way. Also provides an option to
avoid writing out dangling indices at all.

Relates #48701

* Fold node metadata into new node storage (#50741)

Moves node metadata to uses the new storage mechanism (see #48701) as the authoritative source.

* Write CS asynchronously on data-only nodes (#50782)

Writes cluster states out asynchronously on data-only nodes. The main reason for writing out
the cluster state at all is so that the data-only nodes can snap into a cluster, that they can do a
bit of bootstrap validation and so that the shard recovery tools work.
Cluster states that are written asynchronously have their voting configuration adapted to a non
existing configuration so that these nodes cannot mistakenly become master even if their node
role is changed back and forth.

Relates #48701

* Remove persistent cluster settings tool (#50694)

Adds the elasticsearch-node remove-settings tool to remove persistent settings from the on
disk cluster state in case where it contains incompatible settings that prevent the cluster from
forming.

Relates #48701

* Make cluster state writer resilient to disk issues (#50805)

Adds handling to make the cluster state writer resilient to disk issues. Relates to #48701

* Omit writing global metadata if no change (#50901)

Uses the same optimization for the new cluster state storage layer as the old one, writing global
metadata only when changed. Avoids writing out the global metadata if none of the persistent
fields changed. Speeds up server:integTest by ~10%.

Relates #48701

* DanglingIndicesIT should ensure node removed first (#50896)

These tests occasionally failed because the deletion was submitted before the
restarting node was removed from the cluster, causing the deletion not to be
fully acked. This commit fixes this by checking the restarting node has been
removed from the cluster.

Co-authored-by: David Turner <david.turner@elastic.co>

* fix tests

Co-authored-by: David Turner <david.turner@elastic.co>
2020-01-14 09:35:43 +01:00
..
aggregations Support offset in composite aggs (#50609) (#50808) 2020-01-09 14:11:24 -05:00
analysis [DOCS] Add section ID to analysis overview page 2020-01-08 14:43:41 -06:00
cat Remove included docs (#50557) 2020-01-02 17:19:42 +00:00
ccr Remove outdated requirement of CCR (#50859) 2020-01-13 20:00:23 -05:00
cluster [DOCS] Document `transport` and `http` node stats (#50473) 2019-12-26 07:43:14 -05:00
commands Move metadata storage to Lucene (#50928) 2020-01-14 09:35:43 +01:00
docs [DOCS] Fixes "enables you to" typos (#50225) 2019-12-23 14:39:14 -05:00
graph [DOCS] [2 of 5] Change // CONSOLE comments to [source,console] (#46353) (#46502) 2019-09-09 13:38:14 -04:00
high-availability [DOCS] Move snapshot-restore out of modules. (#49618) (#50829) 2020-01-09 16:55:46 -08:00
how-to [DOCS] Remove unneeded redirects (#50476) 2019-12-26 08:29:28 -05:00
ilm [7.x] ILM action to wait for SLM policy execution (#50454) (#50943) 2020-01-14 01:34:33 +01:00
images [DOCS] Replace cross-cluster search PNG images with SVGs (#49395) 2019-11-21 09:06:33 -05:00
index-modules [Docs] Update similarity.asciidoc (#50719) 2020-01-08 17:48:26 +01:00
indices Deprecate synced flush (#50835) 2020-01-13 19:54:38 -05:00
ingest Geo: Switch generated GeoJson type names to camel case (#50400) 2019-12-20 15:37:22 -05:00
licensing [DOCS] Update license expiry links (#50812) 2020-01-09 11:28:43 -08:00
mapping [DOCS] Correct typo in `ignore_malformed` mapping parm docs (#50780) 2020-01-13 09:49:53 -05:00
migration [DOCS] Remove unneeded redirects (#50510) 2020-01-06 09:11:48 -06:00
ml [DOCS] Clarify detector_index property in ML APIs (#50723) 2020-01-09 08:34:34 -08:00
modules [DOCS] Move snapshot-restore out of modules. (#49618) (#50829) 2020-01-09 16:55:46 -08:00
monitoring Recommend Metricbeat for 7.x (#49758) 2019-12-02 21:31:47 +00:00
query-dsl [DOCS] Fix time_zone example in range query docs (#50830) 2020-01-10 08:24:48 -05:00
release-notes [7.x][DOCS] Updates ML links (#50387) (#50409) 2019-12-20 10:01:19 -08:00
rest-api [DOCS] Array of index patterns is also valid source indices with transform (#50777) 2020-01-13 15:46:45 -08:00
rollup [DOCS] Merge rollup config details into API (#49412) 2019-11-22 08:39:49 -08:00
scripting Document use of context in put stored script (#50446) 2019-12-20 10:53:43 -08:00
search Add per-field metadata. (#50333) 2020-01-08 16:21:18 +01:00
settings Disable DiagnosticTrustManager in FIPS 140 (#49888) 2020-01-13 17:04:23 +02:00
setup [DOCS] Adds elasticsearch-keystore command reference (#50872) 2020-01-13 13:08:21 -08:00
snapshot-restore [DOCS] Move snapshot-restore out of modules. (#49618) (#50829) 2020-01-09 16:55:46 -08:00
sql [DOCS] Update SQL REST API pages for new structure (#50690) 2020-01-07 09:27:34 -06:00
testing
transform [Transform] fail to start/put on missing pipeline (#50701) (#50795) 2020-01-09 10:33:22 -05:00
upgrade Deprecate synced flush (#50835) 2020-01-13 19:54:38 -05:00
vectors Remove the 'experimental' marking from vector fields. (#49120) 2019-11-18 12:42:46 -08:00
aggregations.asciidoc
analysis.asciidoc [DOCS] Add overview page to analysis topic (#50515) 2020-01-08 12:54:00 -06:00
api-conventions.asciidoc [DOCS] [2 of 5] Change // CONSOLE comments to [source,console] (#46353) (#46502) 2019-09-09 13:38:14 -04:00
cat.asciidoc [DOCS] Document cat tasks API (#47321) (#47375) 2019-10-01 12:22:50 -04:00
cluster.asciidoc [DOCS] Adds machine learning node type and filters (#49121) 2019-11-15 08:31:59 -08:00
data-rollup-transform.asciidoc [DOCS] Adds transforms to Elasticsearch book (#46846) (#47055) 2019-09-25 08:11:37 -07:00
docs.asciidoc
frozen-indices.asciidoc [DOCS] [2 of 5] Change // CONSOLE comments to [source,console] (#46353) (#46502) 2019-09-09 13:38:14 -04:00
getting-started.asciidoc [Docs] Fix typo in getting-started.asciidoc (#49985) 2019-12-09 16:24:30 +01:00
glossary.asciidoc [DOCS] Move snapshot-restore out of modules. (#49618) (#50829) 2020-01-09 16:55:46 -08:00
gs-index.asciidoc
high-availability.asciidoc [DOCS] Remove leveloffset for CCR docs (#46818) 2019-09-18 09:44:43 -04:00
how-to.asciidoc
index-modules.asciidoc Replace required pipeline with final pipeline (#49470) 2019-11-22 14:37:36 -05:00
index.asciidoc [DOCS] Move snapshot-restore out of modules. (#49618) (#50829) 2020-01-09 16:55:46 -08:00
index.x.asciidoc
indices.asciidoc [DOCS] Reorder index APIs alphabetically (#46981) (#47402) 2019-10-01 17:07:28 -04:00
ingest.asciidoc Replace required pipeline with final pipeline (#49470) 2019-11-22 14:37:36 -05:00
intro.asciidoc [7.x][DOCS] Updates ML links (#50387) (#50409) 2019-12-20 10:01:19 -08:00
mapping.asciidoc [DOCS] Note clause limit in `index.mapping.total_fields.limit` docs (#48153) 2019-10-18 10:20:49 -04:00
modules.asciidoc [DOCS] Move snapshot-restore out of modules. (#49618) (#50829) 2020-01-09 16:55:46 -08:00
query-dsl.asciidoc
redirects.asciidoc [DOCS] Move snapshot-restore out of modules. (#49618) (#50829) 2020-01-09 16:55:46 -08:00
release-notes.asciidoc add release notes for 7.5.0 2019-11-12 09:59:14 +01:00
scripting.asciidoc
search.asciidoc Use snake casing for document field (#45432) 2019-09-19 14:27:00 +02:00
setup.asciidoc [DOCS] Creates a cluster restart documentation page (#48583) 2019-11-12 14:50:53 +01:00
testing.asciidoc
upgrade.asciidoc [DOCS] Change prev version to 7.5 in upgrade docs (#48415) 2019-10-23 12:09:26 -05:00