OpenSearch/docs/reference/indices
Boaz Leskes 6861d3571e Persistent Node Ids (#19140)
Node IDs are currently randomly generated during node startup. That means they change every time the node is restarted. While this doesn't matter for ES proper, it makes it hard for external services to track nodes. Another, more minor, side effect is that indexing the output of, say, the node stats API results in creating new fields due to node ID being used as keys.

The first approach I considered was to use the node's published address as the base for the id. We already [treat nodes with the same address as the same](https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/discovery/zen/NodeJoinController.java#L387) so this is a simple change (see [here](https://github.com/elastic/elasticsearch/compare/master...bleskes:node_persistent_id_based_on_address)). While this is simple and it works for probably most cases, it is not perfect. For example, if after a node restart, the node is not able to bind to the same port (because it's not yet freed by the OS), it will cause the node to still change identity. Also in environments where the host IP can change due to a host restart, identity will not be the same. 

Due to those limitation, I opted to go with a different approach where the node id will be persisted in the node's data folder. This has the upside of connecting the id to the nodes data. It also means that the host can be adapted in any way (replace network cards, attach storage to a new VM). I

It does however also have downsides - we now run the risk of two nodes having the same id, if someone copies clones a data folder from one node to another. To mitigate this I changed the semantics of the protection against multiple nodes with the same address to be stricter - it will now reject the incoming join if a node exists with the same id but a different address. Note that if the existing node doesn't respond to pings (i.e., it's not alive) it will be removed and the new node will be accepted when it tries another join.

Last, and most importantly, this change requires that *all* nodes persist data to disk. This is a change from current behavior where only data & master nodes store local files. This is the main reason for marking this PR as breaking.

Other less important notes:
- DummyTransportAddress is removed as we need a unique network address per node. Use `LocalTransportAddress.buildUnique()` instead.
- I renamed `node.add_lid_to_custom_path` to `node.add_lock_id_to_custom_path` to avoid confusion with the node ID which is now part of the `NodeEnvironment` logic.
- I removed the `version` paramater from `MetaDataStateFormat#write` , it wasn't really used and was just in the way :)
- TribeNodes are special in the sense that they do start multiple sub-nodes (previously known as client nodes). Those sub-nodes do not store local files but derive their ID from the parent node id, so they are generated consistently.
2016-07-04 21:09:25 +02:00
..
aliases.asciidoc Add TESTRESPONSE code 2016-05-12 18:44:08 -07:00
analyze.asciidoc Renamed all AUTOSENSE snippets to CONSOLE (#18210) 2016-05-09 15:42:23 +02:00
clearcache.asciidoc Merge pull request #17030 from 36degrees/patch-1 2016-03-09 15:34:15 +01:00
create-index.asciidoc Add missing comma in JSON data in curl example 2016-05-09 21:20:37 -04:00
delete-index.asciidoc Merge pull request #15856 from marcbachmann/patch-1 2016-01-10 10:48:32 +01:00
flush.asciidoc Renamed all AUTOSENSE snippets to CONSOLE (#18210) 2016-05-09 15:42:23 +02:00
forcemerge.asciidoc Add Force Merge API, deprecate Optimize API 2015-10-20 09:00:24 -06:00
get-field-mapping.asciidoc Document 5.0 mapping changes. 2016-03-22 16:22:58 +01:00
get-index.asciidoc Remove warmers and the warmer API. 2016-01-07 09:57:07 +01:00
get-mapping.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
get-settings.asciidoc Update get-settings.asciidoc 2015-10-02 16:46:45 +02:00
indices-exists.asciidoc [DOCS] add -i flag to more curl HEAD calls 2015-03-21 08:56:20 +01:00
open-close.asciidoc Add option to disable closing indices 2015-10-16 22:10:51 +02:00
put-mapping.asciidoc Renamed all AUTOSENSE snippets to CONSOLE (#18210) 2016-05-09 15:42:23 +02:00
recovery.asciidoc Consolidate shard level abstractions 2015-06-24 15:18:04 +02:00
refresh.asciidoc Rename RobinEngine and friends to InternalEngine 2014-01-13 15:49:10 +01:00
rollover-index.asciidoc Docs: Fixed code callout error. 2016-06-17 14:31:03 -07:00
segments.asciidoc Update segments.asciidoc 2016-01-28 13:33:01 +01:00
shadow-replicas.asciidoc Persistent Node Ids (#19140) 2016-07-04 21:09:25 +02:00
shard-stores.asciidoc Fix typos in docs. 2016-02-09 02:07:32 -08:00
shrink-index.asciidoc Allow `_shrink` to N shards if source shards is a multiple of N (#18699) 2016-06-07 10:06:41 +02:00
stats.asciidoc document suggest stats being merged with search stats 2016-03-23 16:37:57 -04:00
templates.asciidoc Renamed all AUTOSENSE snippets to CONSOLE (#18210) 2016-05-09 15:42:23 +02:00
types-exists.asciidoc [DOCS] add -i flag to curl HEAD call 2015-03-21 08:56:12 +01:00
update-settings.asciidoc Add Force Merge API, deprecate Optimize API 2015-10-20 09:00:24 -06:00
upgrade.asciidoc Docs: Updated the upgrade API docs to explain that the reindex API should be used instead 2016-03-31 14:34:31 +02:00