Commit Graph

53782 Commits

Author SHA1 Message Date
Lisa Cawley 8ad8421262
[DOCS] Refresh transform screenshots with histograms (#59264) 2020-07-23 08:48:06 -07:00
Ed Savage 5a0856efe5
[ML] Remove unused Request constructors (#60129)
Remove unused, empty Request constructors from ml actions in core
plugin.

Relates #59989
2020-07-23 16:33:11 +01:00
Dimitris Athanasiou 41089d5e5b
[ML] Skip test inference if DFA task has been stopped (#60116)
If the job is stopped before starting inference on test data, we
should skip inference entirely.
2020-07-23 17:22:08 +03:00
Ed Savage ef758258c4
[ML] Remove unused RequestBuilder definitions (#59989)
Remove the unused definitions of RequestBuilder classes from the ml
actions within the core plugin.
2020-07-23 14:17:19 +01:00
Albert Zaharovits 53c1d5e393
DOCS audit attributes for API Key authn (#60033)
This PR describes the new audit entry attributes api_key.id,
api_key.name and authentication.type, as well as the meaning of
existing attributes when authentication is performed using API keys.

This should've been part of #58928
2020-07-23 15:49:29 +03:00
Ignacio Vera cb960cdb67
Refactor HyperLogLogPlusPlus to separate algorithms and internal data representation (#60104) 2020-07-23 13:21:56 +02:00
David Turner c1274a4caa
Remove node-level canAllocate override (#59389)
Today there is a node-level `canAllocate` override which the balancer
uses to ignore certain nodes to which it is certain no more shards can
be allocated. In fact this override only ignores nodes which have hit
the rarely-used `cluster.routing.allocation.total_shards_per_node`
limit, so this optimization doesn't have a meaningful impact on real
clusters.

This commit removes this unnecessary fast path from the balancer, and
also removes all the machinery needed to support it.
2020-07-23 08:48:23 +01:00
Armin Braun 785a91c1e3
Optimize some Spots around Closing Resources (#60049)
The single element `close` calls go through a very inefficient path that includes creating
a one element list.
`releaseOnce` is only with a single non-null input in production in two spots so no need for
varargs and any complexity here.
`ReleasableBytesStreamOutput` does not require any `releaseOnce` wrapping because we already have
that kind of logic implemented in `org.elasticsearch.common.util.AbstractArray` (which we were
wrapping here) already.
2020-07-22 23:41:48 +02:00
James Rodewig 453298ff7c
[DOCS] Remove SQL access settings page (#60078)
This page previously documented `xpack.sql.enabled`.

However, in 7.8 and above, `xpack.sql.enabled` is always enabled and
the setting has no effect. There is no reason to maintain this page.
2020-07-22 16:42:52 -04:00
bellengao a9e52194ad
[DOCS] Correct the default value of `ignore_throttled` param (#60036) 2020-07-22 16:34:50 -04:00
Tim Brooks bbbd2282a6
Reenable BWC after human readable backports (#60063)
Commit #60022 enabled human readable indexing pressure stats. The change
broke BWC for node stats so BWC tests were disabled. This commit
reenables the BWC tests.
2020-07-22 13:00:33 -06:00
Lisa Cawley 3f4da04c3e
[DOCS] Changes level offset of transform pages (#60066) 2020-07-22 10:55:48 -07:00
James Rodewig 98d21fe551
[DOCS] Fix shrink index API prereqs (#59985) 2020-07-22 13:10:10 -04:00
James Rodewig d13fd9e1d8
[DOCS] Fix outdated Kibana UI refs and screenshots in security docs (#60023) 2020-07-22 12:14:39 -04:00
Julie Tibshirani 6aee768c7d
Consolidate validation for 'docvalue_fields'. (#59473)
This improves modularity and also fixes some issues when `docvalues_fields` is
used within `inner_hits` or the `top_hits` agg:
* We previously didn't resolve wildcards in field names.
* We also forgot to enforce the limit `index.max_docvalue_fields_search`.
2020-07-22 08:55:52 -07:00
Tim Brooks 5c227dac88
Implement human readable indexing pressure stats (#60022)
The indexing pressure stats do not currently have human readable
variants. This commit add human readable variants and updates the
documentation.
2020-07-22 09:54:51 -06:00
Adam Locke 396dcffe39
[DOCS] Adding new page for restore snapshot API (#59937)
* Adding new page for restore snapshot API.

* Improving test cases, lots of edits, and streamlining content.

* Incorporating review suggestions and feedback.

* Specify `index alias` vs `alias`

* Change parameter order

* Provide clarity around regular expression

* Add link to SLM parameters

* Split sentences in example

* Adding link to master node page.
2020-07-22 11:42:17 -04:00
lcawl b926bf006f [DOCS] Minor typo fix 2020-07-22 08:39:42 -07:00
Armin Braun 6b7f4c6bec
Formalize and Streamline Buffer Sizes used by Repositories (#59771)
Due to complicated access checks (reads and writes execute in their own access context) on some repositories (GCS, Azure, HDFS), using a hard coded buffer size of 4k for restores was needlessly inefficient.
By the same token, the use of stream copying with the default 8k buffer size  for blob writes was inefficient as well.

We also had dedicated, undocumented buffer size settings for HDFS and FS repositories. For these two we would use a 100k buffer by default. We did not have such a setting for e.g. GCS though, which would only use an 8k read buffer which is needlessly small for reading from a raw `URLConnection`.

This commit adds an undocumented setting that sets the default buffer size to `128k` for all repositories. It removes wasteful allocation of such a large buffer for small writes and reads in case of HDFS and FS repositories (i.e. still using the smaller buffer to write metadata) but uses a large buffer for doing restores and uploading segment blobs.

This should speed up Azure and GCS restores and snapshots in a non-trivial way as well as save some memory when reading small blobs on FS and HFDS repositories.
2020-07-22 16:46:37 +02:00
Larry Gregory fc94423c3f
Introduce reserved_ml_apm_user kibana privilege (#59854) 2020-07-22 10:13:20 -04:00
Dan Hermann 83743ee1a2
Include the resolve index action in the view_index_metadata privilege (#59785) 2020-07-22 08:37:52 -05:00
Dan Hermann a3314c1c4a
Ignore template warnings in IndexingIT (#59962) 2020-07-22 07:56:54 -05:00
Nhat Nguyen 64a5802307
Increase timeout in AutoFollowIT (#60004)
It can take more than 10 seconds to auto-follow and create a follow-task 
on a slow CI. This commit increases timeout in AutoFollowIT by replacing
assertBusy with assertLongBusy.

Closes #59952
2020-07-22 08:45:01 -04:00
Dan Hermann dd67392b66
Fix warning handler used in DataStreamsUpgradeIT (#59960) 2020-07-22 06:50:15 -05:00
Dan Hermann ee80dc6c26
Mark data stream APIs as stable (#59860) 2020-07-22 06:47:13 -05:00
Luca Cavanna 198b2d6654
ParametrizedFieldMapper to run validators against default value (#60042)
Sometimes there is the need to make a field required in the mappings, and validate that a value has been provided for it. This can be done through a validator when using ParametrizedFieldMapper, but validators need to run also when a value for a field has not been specified.

Relates to #59332
2020-07-22 12:27:58 +02:00
David Roberts 6f5bbcc05b
[ML] Mute ForecastIT.testOverflowToDisk in EAR builds (#60040)
Due to https://github.com/elastic/elasticsearch/issues/58806
2020-07-22 10:11:44 +01:00
Dimitris Athanasiou f12f57c747
[ML] Include same fields during test inference as in training (#59963)
In #58877, when we switched test inference on java, we just
use the doc's `_source` as features. However, this could be
missing out on features that were used during training,
e.g. alias fields, etc.

This commit addresses this by extracting fields to use as
features during inference the same way they are extracted
in `DataFrameDataExtractor` when they are used for training.
2020-07-22 10:25:03 +03:00
Rene Groeschke c2dc5ad12d
Update Gradle configurations section in CONTRIBUTING (#59906) 2020-07-22 09:11:47 +02:00
Rene Groeschke ef061b92c4
Remove stale gradle plugin descriptor 2020-07-22 09:09:24 +02:00
Emily Li 8d0cb3b893 Fix grammar mistake in SQL data type docs. (#60028)
Remove an extra 'when'.
2020-07-21 16:15:43 -07:00
Jack Conradson 563a515f75
Change user tree visitor in Painless to support visiting children by default (#60025)
This change modifies the UserTreeVisitor to no longer return a value. Return values are now expected 
to be part of the a user tree node's output as a decoration. This allows consistent support for calling all 
children in a default way in the UserTreeBaseVisitor. This allows for new user tree phases to not need 
to override every visit node method and only target ones that are relative to the information that 
needs to be collected.
2020-07-21 16:14:42 -07:00
Jake Landis 7dd57c9415
Introduce javaRestTest source set/task and convert modules (#59939)
Introduce a javaRestTest source set and task to compliment the yamlRestTest.
javaRestTest differs such that the code is sourced from Java and may have
different dependencies and setup requirements for the test clusters. This also
allows the tests to run in parallel in different cluster instances to prevent any
cross test contamination between the two types of tests.

Included in this PR is all :modules no longer use the integTest task. The tests
are now driven by test, yamlRestTest, javaRestTest, and internalClusterTest.
Since only :modules (and :rest-api-spec) have been converted to yamlRestTest
we can now disable the integTest task if either yamlRestTest or javaRestTest have
been applied. Once all projects are converted, we can delete the integTest task.

related: #56841
related: #59444
2020-07-21 17:17:17 -05:00
Nik Everett ad3a3f07d4
Fix bug in deep pipeline agg serialization (forward port of tests in #59984) (#60018)
In #54716 I removed pipeline aggregators from the aggregation result
tree and caused us to read them from the request. This saves a bunch of
round trip bytes, which is neat. But there was a bug in the backwards
compatibility logic. You see, we still have to give the pipeline
aggregations to nodes older than 7.8 over the wire because that is how
they know what pipelines to run. They have the pipelines in the request
but they don't read them. They use the ones in the response tree.

Anyway, we had a bug where we were never sending pipelines defined two
levels down. So while you are upgrading the pipeline wouldn't run.
Sometimes. If the data node of the "first" result was post-7.8 and the
coordinating node was pre-7.8.

This fixes the bug.
2020-07-21 16:49:26 -04:00
James Rodewig c05c8bde81
[DOCS] Update search docs to use `my-index` dataset (#60005) 2020-07-21 15:52:00 -04:00
James Rodewig 4a45c2dafb
[DOCS] Fix data stream docs (#59818) 2020-07-21 15:42:06 -04:00
Jake Landis 2d28f71b26
Per processor description for verbose simulate (#58207)
For ingest node processors a per processor description
was recently added. This commit displays that description
in the verbose output of the pipeline simulation.

related #57906
2020-07-21 14:01:21 -05:00
Jay Modi f269738155
Thread safe clean up of LocalNodeModeListeners (#59932)
This commit continues on the work in #59801 and makes other
implementors of the LocalNodeMasterListener interface thread safe in
that they will no longer allow the callbacks to run on different
threads and possibly race each other. This also helps address other
issues where these events could be queued to wait for execution while
the service keeps moving forward thinking it is the master even when
that is not the case.

In order to accomplish this, the LocalNodeMasterListener no longer has
the executorName() method to prevent future uses that could encounter
this surprising behavior.

Each use was inspected and if the class was also a
ClusterStateListener, the implementation of LocalNodeMasterListener
was removed in favor of a single listener that combined the logic. A
single listener is used and there is currently no guarantee on execution
order between ClusterStateListeners and LocalNodeMasterListeners,
so a future change there could cause undesired consequences. For other
classes, the implementations of the callbacks were inspected and if the
operations were lightweight, the overriden executorName method was
removed to use the default, which runs on the same thread.
2020-07-21 12:42:43 -06:00
James Baiera 0e4f493ac4
Track backing indices in data streams stats from cluster state (#59817)
If shard level results are incomplete in the data streams stats call, it is possible to get inaccurate 
counts of the number of backing indices, despite this data being accurate and available in the 
cluster state.
2020-07-21 13:58:54 -04:00
James Rodewig 3113f9495d
[DOCS] Introduce basic ECS logs test (#59713)
Adds a new `my-index-00001` REST test for docs snippets.

This test can serve as a lightweight replacement for
our existing `twitter` REST tests.

The new dataset is:

* Based on Apache logs, which is better aligned with Elastic use cases
* Compliant with ECS
* Similar to the existing `twitter` data set, containing the same field data types
* Lightweight, which should keep existing test runtimes roughly the same

Also updates the search API reference docs to use the new test.
2020-07-21 12:55:51 -04:00
James Rodewig 80b674fb25
[DOCS] Reformat snippets to use two-space indents (#59973) 2020-07-21 12:24:26 -04:00
Armin Braun eaf34bb57d
Increase Timeout in testSLMRetentionAfterRestore (#59979)
This test failed by hitting the 10s default busy assert timeout.
Given how involved the retention run is (multiple disk reads, CS updates etc.)
we should have a higher timeout here.

Also, removed the pointless delete call for the snapshot that we just asserted is gone,
 at the end of the test.

Closes #59956
2020-07-21 17:46:54 +02:00
malpani 08de504b44
Support ignore_keywords flag for word delimiter graph token filter (#59563)
This commit allows customizing the word delimiter token filters to skip processing 
tokens tagged as keyword through the `ignore_keywords` flag Lucene's 
WordDelimiterGraphFilter already exposes.

Fix for #59491
2020-07-21 16:11:11 +01:00
David Turner fefb31ba17
Fix scheduling of ClusterInfoService#refresh (#59880)
Today the `InternalClusterInfoService` uses the
`LocalNodeMasterListener` interface to start/stop its operations. Since
the `onMaster` and `offMaster` methods are called on the `MANAGEMENT`
threadpool, there's no guarantee that they run in the correct sequence,
which could result in an elected master failing to regularly update the
cluster info.

Since this service is also a `ClusterStateListener` we may as well drop
the usage of the `LocalNodeMasterListener` interface and simply update
the status of the local node on the applier thread in `clusterChanged`
to ensure consistency.

Additionally, today the `InternalClusterInfoService` uses a simple flag
to track whether the local node is the elected master or not. If the
node stops being the master and then starts again within a few seconds
then the scheduled updates from the old mastership might carry on
running in addition to the ones for the new mastership.

This commit addresses that by tracking the identity of the scheduled
update job and creating a new job for each mastership.
2020-07-21 16:06:39 +01:00
James Rodewig 79c45a9099
[DOCS] Mark data stream stats API as stable (#59978)
Removes experimental admon from data stream stats API.
Relates to #59860.
2020-07-21 11:05:34 -04:00
Alan Woodward 4ef33425d2
Wrap up building parametrized TypeParsers (#59977)
The TypeParser implementations of all ParametrizedFieldMapper descendant classes are
essentially the same - stateless, requiring the construction of a Builder object, and calling
parse on it before returning it. We can make this easier (and less error-prone) to
implement by wrapping the logic up into a final class, which takes a function to produce
the Builder from a name and parser context.
2020-07-21 15:44:47 +01:00
Howard b8e3ba783a
[DOCS] Fix missing punctuation in agg docs (#59822) 2020-07-21 10:17:59 -04:00
AndyHunt66 a3a35beb92
[DOCS] Fix typo in LDAP config docs (#59953) 2020-07-21 09:50:44 -04:00
Luca Cavanna 1cf9eac404
Tweak toXContent implementation of ParametrizedFieldMapper (#59968)
ParametrizedFieldMapper overrides `toXContent` from `FieldMapper`, yet it could override `doXContentBody` and rely on the `toXContent` from the base class. Additionally, this allows to make `doXContentBody` final. Also, toXContent is still overridden only to make it final.
2020-07-21 14:47:25 +02:00
Armin Braun 57719fc08c
Stop Checking if Segment Data Blob Exists before Write (#59905)
With uuid named segment data blobs there is no reason to ensure no overwrites are happening
for these blobs when writing. On the contrary, at least on Azure this check can conflict with
the SDK's retrying and cause upload failures randomly.
2020-07-21 14:34:02 +02:00