Commit Graph

52787 Commits

Author SHA1 Message Date
Martijn van Groningen 6f96ac59f7
Backing indices should use composable template matching with the corresponding data stream name (#57640)
Composable templates with exact matches, can match with the data stream name, but not with the backing index name.
Also if the backing index naming scheme changes, then a composable template may never match with a backing index.

In that case mappings and settings may not get applied.
2020-06-05 14:36:35 +02:00
Martijn van Groningen 21450f3f5b
[DOCS] Add data stream overview and intro (#57596)
Added data streams overview page and
an introduction to data streams.

Relates to #53100

Co-authored-by: Dan Hermann <danhermann@users.noreply.github.com>
Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2020-06-05 14:36:01 +02:00
David Kyle bbeda643a6
Delete expired data by job (#57337)
Deleting expired data can take a long time leading to timeouts if there
are many jobs. Often the problem is due to a few large jobs which 
prevent the regular maintenance of the remaining jobs. This change adds
a job_id parameter to the delete expired data endpoint to help clean up
those problematic jobs.
2020-06-05 13:32:35 +01:00
David Roberts 605b4d0ea9
[ML] Add per-partition categorization option (#57683)
This PR adds the initial Java side changes to enable
use of the per-partition categorization functionality
added in elastic/ml-cpp#1293.

There will be a followup change to complete the work,
as there cannot be any end-to-end integration tests
until elastic/ml-cpp#1293 is merged, and also
elastic/ml-cpp#1293 does not implement some of the
more peripheral functionality, like stop_on_warn and
per-partition stats documents.

The changes so far cover REST APIs, results object
formats, HLRC and docs.
2020-06-05 11:56:15 +01:00
DU-ds 4891c457d0 add jvm clarification (#57460)
Emphasise in the Docker documentation that although the default heap size is
1GB, the docker-compose.yml example specifies 512MB.
2020-06-05 11:50:24 +01:00
Armin Braun a86fceebe6
Manually Craft CreateSnapshotRequest to fix BwC Test (#57661)
* Manually Craft CreateSnapshotRequest to fix BwC Test

We can't use the high level create snapshot request any longer
since we changed some of its default parameters in `8` and those
are not understood by older versions like `7.4`.

Closes #57650
2020-06-05 11:16:08 +02:00
Dimitris Athanasiou e116ac850f
[ML] Fix race condition when force stopping DF analytics job (#57680)
When we force delete a DF analytics job, we currently first force
stop it and then we proceed with deleting the job config.
This may result in logging errors if the job config is deleted
before it is retrieved while the job is starting.

Instead of force stopping the job, it would make more sense to
try to stop the job gracefully first. So we now try that out first.
If normal stop fails, then we resort to force stopping the job to
ensure we can go through with the delete.

In addition, this commit introduces `timeout` for the delete action
and makes use of it in the child requests.
2020-06-05 12:13:02 +03:00
Hendrik Muhs 1d1beac7e0
[Transform] use old roles only together with old endpoints (#57710)
avoids a CI failure if new endpoints used together with old roles and warnings are asserted.
2020-06-05 10:07:42 +02:00
Hendrik Muhs ae21e5e4be
[Transform] mark old data frame transform roles deprecated (#57655)
mark old data frame transform roles deprecated

fixes #50087
2020-06-05 09:00:43 +02:00
Jake Landis 7dde9d48e6
Ensure type exists for all monitoring configuration (#57399)
#47711 and #47246 helped to validate that monitoring settings are
rejected at time of setting the monitoring settings. Else an invalid
monitoring setting can find it's way into the cluster state and result
in an exception thrown [1] on the cluster state application (there by
causing significant issues). Some additional monitoring settings have
been identified that can result in invalid cluster state that also
result in exceptions thrown on cluster state application.

All settings require a type of either http or local to be
applicable. When a setting is changed, the exporters are automatically
updated with the new settings. However, if the old or new settings lack
of a type setting an exception will be thrown (since exporters are
always of type 'http' or 'local'). Arguably we shouldn't blindly create
and destroy new exporters on each monitoring setting update, but the
lifecycle of the exporters is abit out the scope this PR is trying to
address.

This commit introduces a similar methodology to check for validity as
#47711 and #47246 but this time for ALL (including non-http) settings.
Monitoring settings are not useful unless there an exporter with a type
defined. The type is used as dependent setting, such that it must
exist to set the value. This ensures that when any monitoring settings
changes that they can only get added to cluster state if the type
exists. If the type exists (and the other validations pass) then the
exporters will get re-built and the cluster state remains valid.

Tests have been included to ensure that all dynamic monitoring settings
have the type as dependent settings.

[1]
org.elasticsearch.common.settings.SettingsException: missing exporter type for [found-user-defined] exporter
at org.elasticsearch.xpack.monitoring.exporter.Exporters.initExporters(Exporters.java:126) ~[?:?]
2020-06-04 16:47:09 -05:00
Nik Everett 1c7bd29f4c
update skip after backport of #57397 (#57694) 2020-06-04 15:37:53 -04:00
James Rodewig 7f201d7f4f
[DOCS] Move source filtering examples (#57689)
Moves the source filtering example snippets form the "Request body
search" API docs page to the "Return fields in a search" section of the
"Run a search" page.
2020-06-04 15:10:18 -04:00
Mark Vieira c9eed19f4c
Remove unused import 2020-06-04 11:52:26 -07:00
Mark Vieira 9ebfbaf6e0
Mute MultiVersionRepositoryAccessIT 2020-06-04 11:43:34 -07:00
Howard c92a9d7e72
Remove unused routing for ClusterState creation utils (#57679)
Remove some unused routing definitions from cluster state creation utils.
2020-06-04 13:50:05 -04:00
Nik Everett 4b9e378d4a Bump skip before backport 2020-06-04 12:16:20 -04:00
Hendrik Muhs 3e39e8097c add missing license header 2020-06-04 17:27:32 +02:00
Nik Everett 69cd4435b2
Merge remaining sig_terms into terms (#57397)
Merges the remaining implementation of `significant_terms` into `terms`
so that we can more easilly make them work properly without
`asMultiBucketAggregator` which *should* save memory and speed them up.

Relates #56487
2020-06-04 11:22:03 -04:00
Hendrik Muhs 3ab4dd9e13
[Transform] improve update API (#57648)
rewrite config on update if either version is outdated, credentials change,
the update changes the config or deprecated settings are found. Deprecated
settings get migrated to the new format. The upgrade can be easily extended to
do any necessary re-writes.

fixes #56499
2020-06-04 17:18:13 +02:00
Armin Braun 3f072aabcb
Restore ThreadContext after Serializing OutboundMessage (#57659)
Stash the current context before restoring the stored context on the IO thread
so that its thread context does not get polluted.

Closes #57554
2020-06-04 16:58:37 +02:00
Ioannis Kakavas 5a7e4d2886
Disable testing conventions for idp in fips (#57663)
Since we disable both integTest and test tasks. This should have
been part of #57048 but we missed it.
2020-06-04 17:32:46 +03:00
James Rodewig 09980ca517
[DOCS] Reformat whitespace in search API docs (#57667)
Changes the search API docs to use:

* Consistent indentation in param definitions
* Two-space indentation in JSON snippets
2020-06-04 09:47:18 -04:00
Rene Groeschke fda9c3f2bb
Set impliesSubProjects flag for root RunTask task (#57615)
Fixes #57521
2020-06-04 14:55:48 +02:00
David Turner d81ea8e7c7
Timeout health API on busy master (#57587)
Today `GET _cluster/health?wait_for_events=...&timeout=...` will wait
indefinitely for the master to process the pending cluster health task,
ignoring the specified timeout. This could take a very long time if the master
is overloaded. This commit fixes this by adding a timeout to the pending
cluster health task.
2020-06-04 13:38:51 +01:00
Benjamin Trent 6e4606bd85
[ML] fix setting forecasts to failed method (#57654) 2020-06-04 08:08:38 -04:00
Przemyslaw Gomulka 0dfc83ab3d
Remove slowlog level (#57591)
Setting a slow log level requires an unnecessary conditional logic in SearchSlowLog and IndexingSlowLog
The behaviour of setting a level on a slow logger can be achieved with correct slow log threshold settings.
This PR is removing slow log and modifies tests to achieve the same behaviour with changing threshold.
relates #56171
2020-06-04 13:33:28 +02:00
István Zoltán Szabó 3a15d84af9
[DOCS] Changes parameter order in model_plot_config. (#57642) 2020-06-04 10:57:36 +02:00
Rene Groeschke 54d2c9e8a7
Gradle Enterprise Plugin Update to 3.3.3 (#57583)
This Updates the gradle enterprise plugin to the latest released version 3.3.3
2020-06-04 10:36:54 +02:00
Rene Groeschke a57dd54306
Update Gradle wrapper to 6.5 (#57580)
* Update Gradle wrapper to 6.5
* Fix groovy incompatibility issue after gradle update
* Fix Gstring String incompatibility
2020-06-04 10:32:47 +02:00
Rene Groeschke 78cb9fa0e6
Remove duplicate ssl setup in sql/qa projects (#57319)
* Remove duplicate ssl setup in sql/qa projects
* Fix enforcement of task instances
* Use static data for cert generation
* Move ssl testing logic into a plugin
* Document test cert creation
2020-06-04 09:40:21 +02:00
Przemysław Witek c4c094c006
Introduce ModelPlotConfig. annotations_enabled setting (#57539) 2020-06-04 09:27:40 +02:00
debadair 181b1a2fbb
[DOCS] Fix chunking in template API docs (#57632)
* [DOCS] Fix chunking in template API docs

* Fixed typo in xref

* Added anchor for beats xref

* Fixed example
2020-06-03 17:14:20 -07:00
Gordon Brown 7d3a7afd16
Include hidden indices in snapshots by default (#57325)
Previously, hidden indices were not included in snapshots by default, unless
specified using one of the usual methods for doing so: naming indices directly,
using index patterns starting with a `.`, or specifying `expand_wildcards` to
a value that includes hidden (e.g. `all` or `hidden,open`).

This commit changes the default `expand_wildcards` value to include hidden
indices.
2020-06-03 17:09:33 -06:00
Gordon Brown 802099a180
Handle `cluster.max_shards_per_node` in YAML config (#57234)
Prior to this commit, `cluster.max_shards_per_node` is not correctly handled
when it is set via the YAML config file, only when it is set via the Cluster
Settings API.

This commit refactors how the limit is implemented, both to enable correctly
handling the setting in the YAML and to more effectively centralize the logic
used to enforce the limit. The logic used to apply the limit, as well as the
setting value, has been moved to the new `ShardLimitValidator`.
2020-06-03 15:08:18 -06:00
William Brafford bfe221f5ab
Version bump for 7.7.1 release (#57620) 2020-06-03 16:38:29 -04:00
Julie Tibshirani 88a2aeb8cf
Remove the 'array value parser' marker interface. (#57571)
This PR replaces the marker interface with the method
FieldMapper#parsesArrayValue. I find this cleaner and it will help with the
fields retrieval work (#55363).

The refactor also ensures that only field mappers can declare they parse array
values. Previously other types like ObjectMapper could implement the marker
interface and be passed array values, which doesn't make sense.
2020-06-03 10:36:00 -07:00
Nik Everett 0df456c34a Test: Protect auto_date_histo from 0 buckets
The test for `auto_date_histogram` as trying to round `Long.MAX_VALUE`
if there were 0 buckets. That doesn't work.

Also, this replaces all of the class variables created to make
consistent random result when testing `InternalAutoDateHistogram` with
the newer `randomResultsToReduce` which is a little simpler to
understand.
2020-06-03 12:48:42 -04:00
Julie Tibshirani de9b91fe48
Add a reference on returning fields during a search. (#57500)
This PR adds a section to the new 'run a search' reference that explains
the options for returning fields. Previously each option was only listed as a
separate request parameter and it was hard to know what was available.
2020-06-03 09:33:26 -07:00
Igor Motov 29b5643c1a
Increase search.max_buckets to 65,535 (#57042)
Increases the default search.max_buckets limit to 65,535, and only counts
buckets during reduce phase.

Closes #51731
2020-06-03 11:54:48 -04:00
James Rodewig 69b79d21fe
[DOCS] Add clear scroll API reference docs (#57367) 2020-06-03 11:42:43 -04:00
Marios Trivyzas ee7868d687
SQL: Use java String methods for LTRIM/RTRIM (#57594)
Previously, we had our own implementation for stripping leading and
trailing whitespaces which substantially less performant than the java's
String stripLeading & stripTrailingMethods.

Enhanced LENGTH unit tests and compine a couple of LTRIM/RTRIM integ
tests.
2020-06-03 16:10:30 +02:00
Nhat Nguyen 88e8c9c0a4
Increase timeout for GlobalCheckpointSyncIT (#57567)
The test failed when it was running with 4 replicas and 3 indexing 
threads. The recovering replicas can prevent the global checkpoint from
advancing. This commit increases the timeout to 60 seconds for this
suite and the check for no inflight requests.

Closes #57204
2020-06-03 08:25:01 -04:00
Marios Trivyzas 6c86c919e1
SQL: Implement TRIM function (#57518)
Add `TRIM` function which combines the functionality of both
`LTRIM` and `RTRIM` by stripping both leading and trailing
whitespaces.

Refers to #41195
2020-06-03 14:24:30 +02:00
Ioannis Kakavas a9338672c5
Add http proxy support for OIDC realm (#57039)
This change introduces support for using an http proxy for egress
communication of the OpenID Connect realm.
2020-06-03 09:36:23 +03:00
Ioannis Kakavas d1e2c423c0
Mute EmailSslTests test case in fips (#57576)
We test expected TLS failures by catching SSLException, but other
security providers ( i.e. BCFIPS ) might throw a different one. In
this case, BCFIPS throws org.bouncycastle.tls.TlsFatalAlert
2020-06-03 08:28:09 +03:00
Russ Cam 2b4635a60e
change track_total_hits on async_search.submit to union (#57329)
Relates: elastic/elasticsearch#51846

This commit updates the async_search.submit.json REST API
spec to make track_total_hits a union of boolean and long,
to reflect the possible values that can be passed.
2020-06-03 09:49:35 +10:00
Russ Cam f77005a0e2
Update snapshot.delete.json to make snapshot a list (#57326)
Relates: elastic/elasticsearch#55474

This commit updates the snapshot.delete.json REST API spec
to make snapshot a list type, now that it can accept a
list of comma-separated snapshot names
2020-06-03 09:48:51 +10:00
Tim Brooks 2b6853f1bf
Fix exception check in RecoveryRequestTrackerTests (#57493)
Currently we check that exceptions are the same in the recovery request
tracker test. This is inconsistent because the future wraps the
exception in a new instance. This commit fixes the test by comparing a
random exception message.

Fixes #57199
2020-06-02 16:47:11 -06:00
James Rodewig 6a769ea699
[DOCS] Replace docdir attribute with es-repo-dir (#57564) 2020-06-02 17:52:41 -04:00
Jake Landis 2a4bcf06e6
Ensure default watches are updated for rolling upgrades. (#57185)
For a rolling/mixed cluster upgrade (add new version to existing cluster
then shutdown old instances), the watches that ship by default
with monitoring may not get properly updated to the new version.
Monitoring watches can only get published if the internal state is
marked as dirty. If a node is not master, will also get marked as
clean (e.g. not dirty).

For a mixed cluster upgrade, it is possible for the new node to be
added, not as master, the internal state gets marked as clean so
that no more attempts can be made to publish the watches. This
happens on all new nodes. Once the old nodes are de-commissioned
one of the new version nodes in the cluster gets promoted to master.
However, that new master node (with out intervention like restarting
the node or removing/adding exporters) will never attempt to re-publish
since the internal state was already marked as clean.

This commit adds a cluster state listener to mark the resource dirty
when a node is promoted to master. This will allow the new resource
to be published without any intervention.
2020-06-02 15:44:49 -05:00