Commit Graph

52145 Commits

Author SHA1 Message Date
Benjamin Trent 081da09c72
Allow GET <pattern>/_rollup/data to expand data streams (#58173) (#58177) 2020-06-16 14:01:54 -04:00
Benjamin Trent 3309817d18
[ML] fixing tree inference ctor to allow target_type to be optional (#58132) (#58165)
The tree trained model object will set its target_type to be regression by default.

This updates the inference object to behave the same way.
2020-06-16 13:29:11 -04:00
Alan Woodward c6acc7c976 Correctly deal with aliases when retrieving lucene FieldType 2020-06-16 18:06:37 +01:00
Benjamin Trent 6c03d97419
Mute TimeSeriesDataStreamsIT.testSearchableSnapshotAction (#58127) (#58181)
Co-authored-by: Andrei Dan <andrei.dan@elastic.co>
2020-06-16 12:40:38 -04:00
Alan Woodward 12a3f6dfca
MappedFieldType should not extend FieldType (#58160)
MappedFieldType is a combination of two concerns:

* an extension of lucene's FieldType, defining how a field should be indexed
* a set of query factory methods, defining how a field should be searched

We want to break these two concerns apart. This commit is a first step to doing this, breaking
the inheritance relationship between MappedFieldType and FieldType. MappedFieldType
instead has a series of boolean flags defining whether or not the field is searchable or
aggregatable, and FieldMapper has a separate FieldType passed to its constructor defining
how indexing should be done.

Relates to #56814
2020-06-16 16:56:43 +01:00
Dan Hermann 911d46370e
Prohibit clone, shrink, and split on a data stream's write index 2020-06-16 10:53:20 -05:00
Lee Hinman 03ce0f8a4d
[7.x] Normalized prefix for rollover API (#57271) (69e1c066) (#58171)
* Normalized prefix for rollover API (#57271)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Lee Hinman <lee@writequit.org>

It fixes the issue #53388
by normalizing prefix at index creation request itself

* Fix compilation for backport

Co-authored-by: Gaurav Chandani <chngau@amazon.com>
2020-06-16 09:22:10 -06:00
Dan Hermann 7079a3b09f
[7.x] Prohibit freezing the write index of a data stream (#58168) 2020-06-16 09:37:32 -05:00
Yannick Welsch 1e235a7f55 Fix off-by-one on CCR lease (#58158)
The leases issued by CCR keep one extra operation around on the leader shards. This is not
harmful to the leader cluster, but means that there's potentially one delete that can't be
cleaned up.
2020-06-16 14:04:58 +02:00
Francisco Fernández Castaño a5bc5ae030
Don't log on RetentionLeaseSync error handler (#58157)
After an index has been deleted it may take some time to cancel all the
maintenance tasks such as RetentionLeaseSync, it's possible that the
task is already executing before the cancellation. This commit just
avoids logging a warning message for those scenarios.

Closes #57864

Backport of (#58098)
2020-06-16 14:04:32 +02:00
David Turner 423697f414 Default to zero replicas for searchable snapshots (#57802)
Today a mounted searchable snapshot defaults to having the same replica
configuration as the index that was snapshotted. This commit changes this
behaviour so that we default to zero replicas on these indices, but allow the
user to override this in the mount request.

Relates #50999
2020-06-16 10:12:23 +01:00
Yannick Welsch e046b0a8fa Fix realtime get of numeric fields (#58121)
Using realtime get on numeric fields when reading from the translog would yield a ClassCastException.

Closes #57462
2020-06-16 09:16:26 +02:00
Tal Levy 69d5e044af
Add optional description parameter to ingest processors. (#57906) (#58152)
This commit adds an optional field, `description`, to all ingest processors
so that users can explain the purpose of the specific processor instance.

Closes #56000.
2020-06-15 19:27:57 -07:00
debadair 2edcd064fe
[DOCS] Fix bad xref (#58150) 2020-06-15 15:50:49 -07:00
Tal Levy 499ad6fcc4
Pre-compile inline scripts in Ingest Script processors (#57960) (#58130)
This commit introduces an optimization for inline scripts.
It keeps the compiled ingest script that the ScriptProcessor.Factory
has been creating for validation purposes. Previously, the Script Service's
cache was leveraged because it was the best way to handle caching of both
stored and inline scripts. Since inline scripts are so widely used in
Ingest Node, it is probably best to ensure we are using the pre-compiled version
from the beginning.
2020-06-15 15:22:56 -07:00
Jake Landis dc7ffb154a
Update hh to HH in date processor example (#58089) (#58144)
Co-authored-by: Leaf-Lin <39002973+Leaf-Lin@users.noreply.github.com>
2020-06-15 17:04:14 -05:00
Lisa Cawley 554e60860f [DOCS] Add token and HTTPS requirements for Kerberos (#57180)
Co-authored-by: Tim Vernum <tim@adjective.org>
2020-06-15 14:30:13 -07:00
Adam Locke ad0364dc06
[DOCS] Add documentation for near real-time search (#57560) (#58138)
* Adding documentation for near real-time search.

* Adding link to NRT topic and clarifying some text.

* Adding diagrams and incorporating changes from David T.
2020-06-15 16:42:57 -04:00
debadair 80524098fc
[DOCS] Reformat release highlights as What's new. (#58073) 2020-06-15 13:26:03 -07:00
Stuart Tettemer 71a42dbde9
[7.x] Rely on the computeIfAbsent logic to prevent duplicated compilation of scripts (#55467) (#58123)
Instead of serializing compilation using a plain lock / mutex combined with a double check, rely on the computeIfAbsent logic to prevent duplicated compilation of scripts. Made checkCompilationLimit to be thread-safe and lock free.

Backport: 865acad

Co-authored-by: Michael Bischoff <michael.bischoff@elastic.co>
2020-06-15 12:01:22 -06:00
James Rodewig e268a89ef2 [DOCS] Fix typo in data stream docs 2020-06-15 12:59:36 -04:00
Lee Hinman d56d2dfb09
[7.x] Scope index templates put during cluster upgrade tests (#58065) (#58122)
This template was added for 7.0 for what I am guessing is a BWC issue related to deprecation
warnings. It unfortunately seems to cause failures because templates for these tests are not cleared
after the test (because these are upgrade tests).

Resolves #56363
2020-06-15 10:47:36 -06:00
Andrei Dan 3635bd741c
[DOCS] Make ILM documentation data stream aware (#58035) (#58110)
Co-authored-by: James Rodewig <james.rodewig@elastic.co>
Co-authored-by: Lee Hinman <dakrone@users.noreply.github.com>
(cherry picked from commit 25cbbe56dd29fbee2efe8040e9c8b92d168cb670)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
2020-06-15 15:16:14 +01:00
markharwood 03dd73dc0d
Fix for wildcard fields that returned ByteRefs not Strings to scripts. (#58060) (#58109)
This need some reorg of BinaryDV field data classes to allow specialisation of scripted doc values.
Moved common logic to a new abstract base class and added a new subclass to return string-based representations to scripts.

Closes #58044
2020-06-15 14:52:56 +01:00
James Rodewig 0bc7c4f69e [DOCS] Fix xref in data stream docs 2020-06-15 09:49:18 -04:00
Dan Hermann 8a910443c4
Add ignore_empty_value parameter in set ingest processor (#57030) (#58108) 2020-06-15 08:35:08 -05:00
István Zoltán Szabó c3e6aa65dc [DOCS] Adds web session details example to painless transform examples (#57942) 2020-06-15 15:19:02 +02:00
István Zoltán Szabó 3a5ee4476d Merge branch '7.x' of github.com:elastic/elasticsearch into 7.x 2020-06-15 15:18:39 +02:00
James Rodewig 66c33c8c96 [DOCS] Update prohibited ops for ds write index
Adds 'clone' and 'split' to a list of actions that are prohibited on a data
stream's write index
2020-06-15 08:57:33 -04:00
James Rodewig 9392210cb5
[DOCS] Add get and delete steps to data stream setup tutorial (#58068) (#58107)
Adds corresponding steps for the get and delete data stream APIs to the
data stream setup tutorial. Also provides some guidance on how to
determine the current write index for a data stream.
2020-06-15 08:52:43 -04:00
Alejandro Fernández Haro 3d0c8da66d Add monitor and view_index_metadata to the built-in `kibana_system` role (#57755)
Allows the kibana user to collect data telemetry in a background
task by giving the kibana_system built-in role the view_index_metadata
and monitoring privileges over all indices (*).
2020-06-15 14:40:27 +03:00
Shaunak Kashyap 5e2faad783 Add ILM policy PUT and GET for remote_monitoring_agent built-in role (#57963)
Without this fix, users who try to use Metricbeat for Stack Monitoring today
see the following error repeatedly in their Metricbeat log. Due to this error
Metricbeat is unwilling to proceed further and, thus, no Stack Monitoring
data is indexed into the Elasticsearch cluster.

Co-authored-by: Albert Zaharovits <albert.zaharovits@elastic.co>
2020-06-15 14:35:30 +03:00
Rene Groeschke 9be89e8aca Make Gradle IT tests debuggable (#58093)
- This configures the testkit gradle runner to run with debug enabled automatically when
test is executed in debug mode (e.g. from the IDE)
- Allows step by step debugging of GradleIntegrationTestCase tests
2020-06-15 11:52:20 +02:00
Ignacio Vera 1cc3c1a354
GeometryTestUtils should always generate valid polygons (#58034) (#58091)
Make sure we always generate legal polygons, e.g they have area
2020-06-15 09:36:44 +02:00
Rene Groeschke a7a1b78882
Fix resolveAllDependencies to ignore testCompile (#58080) (#58084) 2020-06-15 00:01:46 +02:00
Rene Groeschke 01e9126588
Remove deprecated usage of testCompile configuration (#57921) (#58083)
* Remove usage of deprecated testCompile configuration
* Replace testCompile usage by testImplementation
* Make testImplementation non transitive by default (as we did for testCompile)
* Update CONTRIBUTING about using testImplementation for test dependencies
* Fail on testCompile configuration usage
2020-06-14 22:30:44 +02:00
Armin Braun 1a48983a56
Fix Running TranslogOps on CS Thread (#58056) (#58076)
We should fork off from the CS thread to run this even if it's a rare
condition.
2020-06-13 17:00:49 +02:00
Gordon Brown a33b2f9956
Clarify `expand_wildcard` option in snapshot docs (#58016)
This commit clarifies that the `expand_wildcards` option (as well as other
`IndicesOptions` parameters) can be used with the Create Snapshot API, but that
they must be in the body of the request.

Also clarifies the connection between `expand_wildcards` and hidden indices as
it relates to snapshots.
2020-06-12 16:38:52 -06:00
Nik Everett a5571eb1a8
Save memory when rare_terms is not on top (backport of #57948) (#58069)
This uses the optimization that we started making in #55873 for
`rare_terms` to save a bit of memory when that aggregation is not on the
top level.
2020-06-12 17:47:10 -04:00
Jason Tedor ddf2ee3f23
Revert "Make dependenciesInfo task filter out project dependencies (#58015) (#58057)"
This reverts commit e8e351769f.
2020-06-12 17:04:57 -04:00
Jason Tedor dcf4131f00
Revert "Add JNA license to SQL CLI dependency licenses"
This reverts commit 076b32d4f3.
2020-06-12 17:04:39 -04:00
Dan Hermann 17f3318732
[7.x] Resolve index API (#58037) 2020-06-12 15:41:32 -05:00
Jason Tedor 076b32d4f3
Add JNA license to SQL CLI dependency licenses
Previously we excluded requiring licenses for dependencies with the
group name org.elasticsearch under the assumption that these use the
top-level Elasticsearch license. This is not always correct, for
example, for the org.elasticsearch:jna dependency as this is merely a
wrapper around the upstream JNA project, and that is the license that we
should be including. A recent change modified this check from using the
group name to checking only if the dependency is a project
dependency. This exposed the use of JNA in SQL CLI to this check, but
the license for it was not added. This commit addresses this by adding
the license.

Relates #58015
2020-06-12 16:38:23 -04:00
Benjamin Trent 79c784932f
[ML] allow feature_names to be optional in ensemble inference model (#58059) (#58067)
This has `EnsembleInferenceModel` not parse feature_names from the XContent.

Instead, it will rely on `rewriteFeatureIndices` to be called ahead time.

Consequently, protections are made for a fail fast path if `rewriteFeatureIndices` has not been called before `infer`.
2020-06-12 16:33:54 -04:00
Mark Vieira 0ce102a5f4
Fix issue with bwc tests running wrong cluster versions (#58063)
We were previously configuring BWC testing tasks by matching on task
name prefix. This naive approach breaks down when you have versions like
1.0.1 and 1.0.10 since they both share a common prefix. This commit
makes the pattern matching more specific so we won't inadvertently
spin up the wrong cluster version.
2020-06-12 12:34:15 -07:00
Nik Everett 5056f2792d
Skip max_buckets test when it is flaky (#58038)
Before #57042 the max_buckets test would consistently pass because the
request would consistently fail. In particular, the request would fail on
the data node. After #57042 it only fails on the coordinating node. When
the max_buckets test is run in a mixed version cluster it consistently
fails on *either* the data node or the coordinating node. Except when
the coordinating node is missing #43095. In that case if the one data
node has #57042 and one does not, *and* the one that doesn't gets the
request first, fails it as expected, and then the coordinating node
retries the request on the node with #57042. When that happens the
request fails mysteriously with "partial shard failures" as the error
message but not partial failures reported. This is *exactly* the bug
fixed in #43095.

This updates the test to be skipped in mixed version clusters without
 #43095 because they *sometimes* fail the test spuriously. The request
fails in those cases, just like we expect, but with a mysterious error
message.

Closes #57657
2020-06-12 15:06:56 -04:00
James Rodewig 0906709598 [DOCS] Reword prohibited ops for data stream write index 2020-06-12 14:00:24 -04:00
James Baiera e8e351769f
Make dependenciesInfo task filter out project dependencies (#58015) (#58057)
By default we filter out projects from dependencies info task based on their 
group names. We should be filtering based on if the dependency is a project 
dependency.
2020-06-12 13:41:29 -04:00
Ryan Ernst 3e504fb69a
Re-enable certgen cli tests on windows (#58017)
relates #50825
2020-06-12 10:22:02 -07:00
Matthias Gärtner 65ca575632 Off-by-ones on data sizes in documentation (#57735)
Fixes exponent off-by-ones in Painless documentation for int and long.
2020-06-12 09:59:15 -07:00