Commit graph

779 commits

Author SHA1 Message Date
Yannick Welsch
0b517ddca6
Provide option to allow writes when master is down (#60605)
Elasticsearch currently blocks writes by default when a master is unavailable. The cluster.no_master_block setting allows
a user to change this behavior to also block reads when a master is unavailable. This PR introduces a way to now also still
allow writes when a master is offline. Writes will continue to work as long as routing table changes are not needed (as
those require the master for consistency), or if dynamic mapping updates are not required (as again, these require the
master for consistency).

Eventually we should switch the default of cluster.no_master_block to this new mode.
2020-08-12 16:37:32 +02:00
Jay Modi
8c51fc7e2d
System index reads in separate threadpool (#57936)
This commit introduces a new thread pool, `system_read`, which is
intended for use by system indices for all read operations (get and
search). The `system_read` pool is a fixed thread pool with a maximum
number of threads equal to lesser of half of the available processors
or 5. Given the combination of both get and read operations in this
thread pool, the queue size has been set to 2000. The motivation for
this change is to allow system read operations to be serviced in spite
of the number of user searches.

In order to avoid a significant performance hit due to pattern matching
on all search requests, a new metadata flag is added to mark indices
as system or non-system. Previously created system indices will have
flag added to their metadata upon upgrade to a version with this
capability.

Additionally, this change also introduces a new class, `SystemIndices`,
which encapsulates logic around system indices. Currently, the class
provides a method to check if an index is a system index and a method
to find a matching index descriptor given the name of an index.

Relates #50251
Relates #37867
2020-08-10 12:38:54 -06:00
David Turner
19eb922d9f
Remove join timeout (#60873)
There is no point in timing out a join attempt any more. Timing out and
retrying with the same master is pointless, and an in-flight join
attempt to one master no longer blocks attempts to join other masters.
This commit removes this unnecessary setting.

Relates #60872 in which this setting was deprecated.
2020-08-10 13:57:54 +01:00
James Rodewig
ba88f0bd6a
[DOCS] Move inner hits content to separate page (#60840)
Moves inner hits content from the deprecated 'Request Body Search'
chapter to a separate page.
2020-08-06 13:47:06 -04:00
James Rodewig
ae01606785
[DOCS] Replace twitter dataset in docs (#60604) 2020-08-03 12:49:56 -04:00
Alexander Reelsen
c7ac9e7073
[DOCS] http -> https, remove outdated plugin docs (#60380)
Plugin discovery documentation contained information about installing
Elasticsearch 2.0 and installing an oracle JDK, both of which is no
longer valid.

While noticing that the instructions used cleartext HTTP to install
packages, this commit replaces HTTPs links instead of HTTP where possible.

In addition a few community links have been removed, as they do not seem
to exist anymore.
2020-07-31 15:58:38 -04:00
James Rodewig
aec26b1a23
[DOCS] Move search pagination content to one page (#60515) 2020-07-31 11:43:06 -04:00
David Turner
1f5b842607
Clarify remote clusters' use of transport layer (#60268)
Today there are a few places in the transport layer docs where we talk
about communication between nodes _within a cluster_. We also use the
transport layer for remote cluster connections, and these statements
also apply there, but this is not clear from today's docs. This commit
generalises these statements to make it clear that they apply to remote
cluster connections too.

It also adds a link from the docs on configuring TCP retries to the
(deeply-buried) docs on preserving long-lived connections.
2020-07-29 13:01:17 +01:00
Yannick Welsch
b2b01dc6de
Properly document keepalive and other tcp options (#60216)
Keepalive options are not well-documented (only in transport section, although also available at http and network level).

Co-authored-by: David Turner <david.turner@elastic.co>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2020-07-28 10:14:56 +02:00
Julie Tibshirani
8a89d95372
Add search fields parameter to support high-level field retrieval. (#60100)
This feature adds a new `fields` parameter to the search request, which
consults both the document `_source` and the mappings to fetch fields in a
consistent way. The PR merges the `field-retrieval` feature branch.

Addresses #49028 and #55363.
2020-07-27 13:25:55 -07:00
James Rodewig
441c3a21b1
[DOCS] Update my-index examples (#60132)
Changes the following example index names to `my-index-000001` for consistency:

* `my-index`
* `my_index`
* `myindex`
2020-07-27 14:46:39 -04:00
Yannick Welsch
2078509af5
Set specific keepalive options by default on supported platforms (#59278)
keepalives tell any intermediate devices that the connection remains alive, which helps with overzealous firewalls that are
killing idle connections. keepalives are enabled by default in Elasticsearch, but use system defaults for their
configuration, which often times do not have reasonable defaults (e.g. 7200s for TCP_KEEP_IDLE) in the context of
distributed systems such as Elasticsearch.

This PR sets the socket-level keep_alive options for network.tcp.{keep_idle,keep_interval} to 5 minutes on configurations
that support it (>= Java 11 & (MacOS || Linux)) and where the system defaults are set to something higher than 5
minutes. This helps keep the connections alive while not interfering with system defaults or user-specified settings
unless they are deemed to be set too high by providing better out-of-the-box defaults.
2020-07-27 13:38:24 +02:00
James Rodewig
2774cd6938
[DOCS] Swap [float] for [discrete] (#60124)
Changes instances of `[float]` in our docs for `[discrete]`.

Asciidoctor prefers the `[discrete]` tag for floating headings:
https://asciidoctor.org/docs/asciidoc-asciidoctor-diffs/#blocks
2020-07-23 11:48:22 -04:00
Nik Everett
f87b31f973
Document supported scenarios for CCS (#58120)
Documents the supported scenarios for CCS.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2020-07-20 10:03:08 -04:00
Rory Hunter
4db094c008
Remove dangling index auto import functionality (#59698)
Closes #48366. Remove all traces of automatically importing dangling indices. This functionality is
deprecated from 7.9.0.
2020-07-17 15:17:58 +01:00
Tim Brooks
e05858132d
Update thread pool docs about WRITE queue size (#59643)
This commit updates the thread pool documentation to reflect the change
in the WRITE thread pool default queue size.
2020-07-16 09:32:51 -06:00
debadair
5d7271a910
Update node.asciidoc (#59201) (#59480)
TIP block was missing due to the lack of line break prior to the "TIP"

Co-authored-by: Leaf-Lin <39002973+Leaf-Lin@users.noreply.github.com>
2020-07-13 16:50:54 -07:00
Nhat Nguyen
961db311f0
Sending operations concurrently in peer recovery (#58018)
Today, we send operations in phase2 of peer recoveries batch by batch 
sequentially. Normally that's okay as we should have a fairly small of
operations in phase 2 due to the file-based threshold. However, if
phase1 takes a lot of time and we are actively indexing, then phase2 can
have a lot of operations to replay.

With this change, we will send multiple batches concurrently (defaults 
to 1) to reduce the recovery time.
2020-07-07 18:00:03 -04:00
Lisa Cawley
fca1ece693
[DOCS] Clarifies transform node settings (#59023) 2020-07-07 13:31:04 -07:00
David Turner
c661a40083
Add docs for filesystem health checks (#59134)
Documents the feature and settings introduced in #52680.

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2020-07-07 14:14:35 +01:00
Rory Hunter
3f51fedfe6
Dangling indices documentation (#58751)
Part of #48366. Add documentation for the dangling indices
API added in #58176.

Co-authored-by: David Turner <david.turner@elastic.co>
Co-authored-by: Adam Locke <adam.locke@elastic.co>
2020-07-03 16:28:32 +01:00
Adam Locke
3a1258fe97
[DOCS] Add supported ESS settings to ES docs (#57953)
* Adding ESS icons to supported ES settings.

* Adding new file for supported ESS settings.

* Adding supported ESS settings for HTTP and disk-based shard allocation.

* Adding more supported settings for ESS.

* Adding descriptions for each Cloud section, plus additional settings.

* Adding new warehouse file for Cloud, plus additional settings.

* Adding node settings for Cloud.

* Adding audit settings for Cloud.

* Resolving merge conflict.

* Adding SAML settings (part 1).

* Adding SAML realm encryption and signing settings.

* Adding SAML SSL settings.

* Adding Kerberos realm settings.

* Adding OpenID Connect Realm settings.

* Adding OpenID Connect SSL settings.

* Resolving leftover Git merge markers.

* Removing Cloud settings page and link to it.

* Add link to mapping source

* Update docs/reference/docs/reindex.asciidoc

* Incorporate edit of HTTP settings

* Remove "cloud" from tag and ID

* Remove "cloud" from tag and update description

* Remove "cloud" from tag and ID

* Change "whitelists" to "specifies"

* Remove "cloud" from end tag

* Removing cloud from IDs and tags.

* Changing link reference to fix build issue.

* Adding index management page for missing settings.

* Removing warehouse file for Cloud and moving settings elsewhere.

* Clarifying true/false usage of http.detailed_errors.enabled.

* Changing underscore to dash in link to fix ci build.
2020-07-02 14:13:06 -04:00
David Turner
acf031cdb5
Forbid read-only-allow-delete block in blocks API (#58727)
* Forbid read-only-allow-delete block in blocks API

The read-only-allow-delete block is not really under the user's control
since Elasticsearch adds/removes it automatically. This commit removes
support for it from the new API for adding blocks to indices that was
introduced in #58094.

* Missing xref

* Reword paragraph on read-only-allow-delete block
2020-07-01 12:57:34 +01:00
David Turner
83d6589b2a
Account for remaining recovery in disk allocator (#58029)
Today the disk-based shard allocator accounts for incoming shards by
subtracting the estimated size of the incoming shard from the free space on the
node. This is an overly conservative estimate if the incoming shard has almost
finished its recovery since in that case it is already consuming most of the
disk space it needs.

This change adds to the shard stats a measure of how much larger each store is
expected to grow, computed from the ongoing recovery, and uses this to account
for the disk usage of incoming shards more accurately.
2020-07-01 08:04:45 +01:00
Yannick Welsch
118521d022
Account for recovery throttling when restoring snapshot (#58658)
Restoring from a snapshot (which is a particular form of recovery) does not currently take recovery throttling into account
(i.e. the `indices.recovery.max_bytes_per_sec` setting). While restores are subject to their own throttling (repository
setting `max_restore_bytes_per_sec`), this repository setting does not allow for values to be configured differently on a
per-node basis. As restores are very similar in nature to peer recoveries (streaming bytes to the node), it makes sense to
configure throttling in a single place.

The `max_restore_bytes_per_sec` setting is also changed to default to unlimited now, whereas previously it was set to
`40mb`, which is the current default of `indices.recovery.max_bytes_per_sec`). This means that no behavioral change
will be observed by clusters where the recovery and restore settings were not adapted.

Relates https://github.com/elastic/elasticsearch/issues/57023

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2020-06-30 13:08:21 +02:00
Jason Tedor
a914d84429
Introduce node.roles setting (#54998)
Today we have individual settings for configuring node roles such as
node.data and node.master. Additionally, roles are pluggable and we have
used this to introduce roles such as node.ml and node.voting_only. As
the number of roles is growing, managing these becomes harder for the
user. For example, to create a master-only node, today a user has to
configure:
 - node.data: false
 - node.ingest: false
 - node.remote_cluster_client: false
 - node.ml: false

at a minimum if they are relying on defaults, but also add:
 - node.master: true
 - node.transform: false
 - node.voting_only: false

If they want to be explicit. This is also challenging in cases where a
user wants to have configure a coordinating-only node which requires
disabling all roles, a list which we are adding to, requiring the user
to keep checking whether a node has acquired any of these roles.

This commit addresses this by adding a list setting node.roles for which
a user has explicit control over the list of roles that a node has. If
the setting is configured, the node has exactly the roles in the list,
and not any additional roles. This means to configure a master-only
node, the setting is merely 'node.roles: [master]', and to configure a
coordinating-only node, the setting is merely: 'node.roles: []'.

With this change we deprecate the existing 'node.*' settings such as
'node.data'.
2020-06-24 14:46:31 -04:00
bellengao
0fb6650146
[DOCS] Fix typo in remote-clusters doc (#57820) 2020-06-09 11:28:02 +02:00
James Rodewig
89e35b4079 [DOCS] Fix heading capitalization in CCS docs 2020-06-02 11:11:28 -04:00
James Rodewig
b5e3a998a8 [DOCS] Remove unneeded word from network settings docs 2020-06-01 11:09:17 -04:00
Adam Locke
7dd731b9a2
[DOCS] Explain flood stage watermark. (#57184)
* Changes for issue #36114.

* Adding stronger wording to the new note.

* Removing statement about typically not needting to set the read-only allow delete block.

* Replacing Elasticsearch with {es} variable.
2020-05-28 10:57:40 -04:00
Nick Canzoneri
8d70f0696f
[DOCS] Fix remote cluster client node docs (#57176)
Changes:

* Documents the `r` role in the _cat/nodes API docs

* Fixes a typo in the node docs
2020-05-27 08:41:45 -04:00
James Rodewig
1bfd7efb44
[DOCS] Fix default for http.compression setting (#56899)
Elasticsearch enables HTTP compression by default. However, to mitigate
potential security risks like the BREACH attack, compression is disabled by
default if HTTPS is enabled.

This updates the `http.compression` setting definition accordingly and adds
additional context.

Co-authored-by: Leaf-Lin <39002973+Leaf-Lin@users.noreply.github.com>
2020-05-20 12:11:49 -04:00
James Rodewig
70cb519aa7
[DOCS] Relocate discovery module content (#56611)
* Moves `Discovery and cluster formation` content from `Modules` to
`Set up Elasticsearch`.

* Combines `Adding and removing nodes` with `Adding nodes to your
  cluster`. Adds related redirect.

* Removes and redirects the `Modules` page.

* Rewrites parts of `Discovery and cluster formation` to remove `module`
  references and meta references to the section.
2020-05-12 17:39:06 -04:00
James Rodewig
6ef9506beb
[DOCS] Correct setting type for indices.query.bool.max_clause_count (#56640)
#56449 incorrectly labelled this as a dynamic setting.

This corrects that error.
2020-05-12 16:25:41 -04:00
James Rodewig
7c449319a1
[DOCS] Relocate shard allocation module content (#56535) 2020-05-12 08:55:57 -04:00
James Rodewig
af2d13144f
[DOCS] Add reference docs for search.max_buckets setting (#56449)
Adds reference-style setting documentation for the `search.max_buckets`
setting.

This setting was previously only documented on the [bucket
aggregations][0] page.

[0]: https://www.elastic.co/guide/en/elasticsearch/reference/master/search-aggregations-bucket.html
2020-05-11 08:35:24 -04:00
James Rodewig
4e81fb8833
[DOCS] Relocate local gateway setting content (#56448)
Moves `local gateway` setting content to `Configuring Elasticsearch`
from `Modules`.

Relates to #53303.
2020-05-11 08:34:55 -04:00
James Rodewig
12440185c6
[DOCS] Relocate HTTP module content (#56386)
Moves `HTTP` content from the [Modules][0] section to the
[Configuring Elasticsearch][1] section.

Supporting changes:
* Replaces `http` with `HTTP` throughout
* Replaces `HTTP module` with `HTTP layer` throughout
* Increments several headings
* Adds explicit anchors to several headings
* Removes several unneeded `[float]` attributes

Closes #53306

[0]: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules.html
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/master/settings.html
2020-05-08 13:11:21 -04:00
James Rodewig
fabb3e18b9
[DOCS] Relocate node module content (#56376)
Moves `node` content from the [Modules][0] section to the
[Configuring Elasticsearch][1] section.

Supporting changes:
* Retitles page `Node settings`
* Increments several headings
* Removes several unneeded `[float]` attributes
* Replaces remaining `[float]` attributes with `[discrete]`
* Updates the `Other node settings` section

Relates to #53307

[0]: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules.html
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/master/settings.html
2020-05-08 08:24:00 -04:00
James Rodewig
f26f1021e8
[DOCS] Relocate thread pools content (#55814)
Moves [thread pools content][0] from [Modules][1] to
[Configuring Elasticsearch][2].

Supporting changes:
* Changes page title to "Thread pools"
* Increments several headings
* Removes several unneeded `[float]` attributes
* Updates the anchors of several headings

Relates to #53307

[0]: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-threadpool.html
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules.html
[2]: https://www.elastic.co/guide/en/elasticsearch/reference/master/settings.html

Co-authored-by: debadair <debadair@elastic.co>

Co-authored-by: debadair <debadair@elastic.co>
2020-05-05 09:48:36 -04:00
James Rodewig
a73fef3d62
[DOCS] Create top-level "Search your data" page (#56058)
* [DOCS] Create top-level "Search your data" page

**Goal**

Create a top-level search section. This will let us clean up our search
API reference docs, particularly content from [`Request body search`][0].

**Changes**

* Creates a top-level `Search your data` page. This page is designed to
  house concept and tutorial docs related to search.

* Creates a `Run a search` page under `Search your data`. For now, This
  contains a basic search tutorial. The goal is to add content from
  [`Request body search`][0] to this in the future.

* Relocates `Long-running searches` and `Search across clusters` under
  `Search your data`. Increments several headings in that content.

* Reorders the top-level TOC to move `Search your data` higher. Also
  moves the `Query DSL`, `EQL`, and `SQL access` chapters immediately
  after.

Relates to #48194

[0]: https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html
2020-05-05 09:46:29 -04:00
James Rodewig
3dd0aa3229
[DOCS] Relocate network settings content (#55865)
Moves [network settings content][0] from [Modules][1] to the
[Configuring Elasticsearch][2] section.

Supporting changes:
* Changes page title and headings to sentence case
* Increments several headings
* Removes several unneeded `[float]` and `[horizontal]` attributes
* Removes several unneeded blank links in definition lists

[0]: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-network.html
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules.html
[2]: https://www.elastic.co/guide/en/elasticsearch/reference/master/settings.html
2020-05-05 09:31:45 -04:00
William Brafford
f36ab092ed
Deprecated xpack "enable" settings should be no-ops (#55416)
The following settings are now no-ops:

* xpack.flattened.enabled
* xpack.logstash.enabled
* xpack.rollup.enabled
* xpack.slm.enabled
* xpack.sql.enabled
* xpack.transform.enabled
* xpack.vectors.enabled

Since these settings no longer need to be checked, we can remove settings
parameters from a number of constructors and methods, and do so in this
commit.

We also update documentation to remove references to these settings.
2020-05-04 16:49:11 -04:00
Henning Andersen
0bd28aed4e
Disk decider respect watermarks for single data node (#55805)
The disk decider had special handling for the single data node case,
allowing any allocation (skipping watermark checks) for such clusters.
This special handling can now be avoided via a setting.
2020-04-28 11:55:42 +02:00
Stuart Tettemer
bd64da0960
Scripting: Deprecate general cache settings (#55038)
* Scripting: Deprecate general cache settings

* Add script.disable_max_compilations_rate setting

* Move construction to ScriptCache

* Use ScriptService to do updates of CacheHolder

* Remove fallbacks

* Add SCRIPT_DISABLE_MAX_COMPILATIONS_RATE_SETTING to ClusterSettings

* Node scope

* Use back compat

* 8.0 for bwc

* script.max_compilations_rate=2048/1m -> script.disable_max_compilations_rate=true in docker compose

* do not guard in esnode

* Doc update

* isSnapshotBuild() -> systemProperty 'es.script.disable_max_compilations_rate', 'true'

* Do not use snapshot in gradle to set max_compilations_rate

* Expose cacheHolder as package private

* monospace 75/5m in cbreaker docs, single space in using

* More detail in general compilation rate error

* Test: don't modify defaultConfig on upgrade
2020-04-22 12:33:33 -06:00
James Rodewig
58b1b33e7b
[DOCS] Relocate transport module content (#55472)
Moves `transport` content from the [Modules][0] section to the
[Configuring Elasticsearch][1] section.

Supporting changes:
* Adds explicit anchors to several headings
* Changes several headings to sentence case
* Increments several headings
* Removes several unneeded `[float]` attributes
* Replaces `transport module` with `transport layer`

Relates to #53305

[0]: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules.html
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/master/settings.html
2020-04-21 09:43:41 -04:00
David Turner
10ab397d7f
Adjust docs for voting config exclusions API (#55006)
In #50836 we deprecated the existing voting config exclusions API and added a
new one. This commit adjust the docs to match.
2020-04-20 19:47:09 +01:00
William Brafford
92c8a73348
Deprecate disabling basic-license features (#54816)
We believe there's no longer a need to be able to disable basic-license
features completely using the "xpack.*.enabled" settings. If users don't
want to use those features, they simply don't need to use them. Having
such features always available lets us build more complex features that
assume basic-license features are present.

This commit deprecates settings of the form "xpack.*.enabled" for
basic-license features, excluding "security", which is a special case.
It also removes deprecated settings from integration tests and unit
tests where they're not directly relevant; e.g. monitoring and ILM are
no longer disabled in many integration tests.
2020-04-17 09:18:55 -04:00
James Rodewig
44a643c0e5
[DOCS] Relocate "Remote Clusters" page (#55172)
Relocates the "Remote Clusters" documentation from the "Modules" section to the "Set up Elasticsearch" section.

Supporting changes:
* Reorders the "Bootstrap checks for X-Pack" section to immediately follow the "Bootstrap checks"chapter.
* Removes an outdated X-Pack `idef` from the "Remote Clusters" intro.
2020-04-15 10:11:30 -04:00
James Rodewig
4980ea7596
[DOCS] Document max_concurrent_searches default (#55116) 2020-04-15 10:02:33 -04:00