Commit Graph

49447 Commits

Author SHA1 Message Date
Andrei Stefan 034f4cf7b4
Fix NULL handling for FLOOR and CEIL math functions (#49644) 2019-12-02 16:04:28 +02:00
Andrei Stefan dd3aeb8f54
Fix Locate function optional parameter handling (#49666) 2019-12-02 16:03:52 +02:00
David Turner 69e0b1a0f4
Drop snapshot instructions for autobootstrap fix (#49755)
The "Restore any snapshots as required" step is a trap: it's somewhere between
tricky and impossible to restore multiple clusters into a single one.

Also add a note about configuring discovery during a rolling upgrade to
proscribe any rare cases where you might accidentally autobootstrap during the
upgrade.
2019-12-02 12:43:18 +00:00
Christoph Büscher c3ab6f71c8
Add note how to run locale sensitive unit test (#49491)
Some unit test checking locale sensitive functionality require the
-Djava.locale.providers=SPI,COMPAT flag to be set. When running tests though
gradle we pass this already to the BuildPlugin, but running from the IDE this
might need to be set manually. Adding a note explaining this to the
CONTRIBUTING.md doc and leaving a note in the test comment of
SearchQueryIT.testRangeQueryWithLocaleMapping which is a test we know
that suffers from this issue.
2019-12-02 11:21:34 +01:00
Mayya Sharipova 4f1ebfaac5
Add bulkScorer to script score query (#46336)
Some queries return bulk scorers that can be significantly faster than
iterating naively over the scorer. By giving script_score a BulkScorer
that would delegate to the wrapped query, we could make it faster in some cases.

Closes #40837
2019-11-29 14:32:17 -05:00
Tugberk Ugurlu ac07248402 [Docs] Fix typo in templates.asciidoc (#49726) 2019-11-29 18:43:45 +01:00
Henning Andersen 5b56a990b0
Deprecate sorting in reindex (#49458)
Reindex sort never gave a guarantee about the order of documents being
indexed into the destination, though it could give a sense of locality
of source data.

It prevents us from doing resilient reindex and other optimizations and
it has therefore been deprecated.

Related to #47567
2019-11-29 17:46:44 +01:00
Marios Trivyzas 54fe7f5728
SQL: Fix issues with WEEK/ISO_WEEK/DATEDIFF (#49405)
Some extended testing with MS-SQL server and H2 (which agree on
results) revealed bugs in the implementation of WEEK related extraction
and diff functions.

Non-iso WEEK seems to be broken since #48209 because
of the replacement of Calendar and the change in the ISO rules.

ISO_WEEK failed for some edge cases around the January 1st.

DATE_DIFF was previously based on non-iso WEEK extraction which seems
not to be the case.

Fixes: #49376
2019-11-29 17:06:26 +01:00
Dimitris Athanasiou 0ac6c3d539
[ML] Fix DFA source filtering versions and unmute BWC tests (#49725)
Relates #49690
2019-11-29 17:25:45 +02:00
Ignacio Vera fffba252f3
Replace usages of XPackPlugin with the LocalStateCompositeXPackPlugin (#49714) 2019-11-29 15:00:38 +01:00
Dimitris Athanasiou 0464e57b74 [ML] Mute data frame analytics BWC tests
Until #49690 is backported to 7.x
2019-11-29 14:38:06 +02:00
Dimitris Athanasiou bad07b76f7
[ML] Add optional source filtering during data frame reindexing (#49690)
This adds a `_source` setting under the `source` setting of a data
frame analytics config. The new `_source` is reusing the structure
of a `FetchSourceContext` like `analyzed_fields` does. Specifying
includes and excludes for source allows selecting which fields
will get reindexed and will be available in the destination index.

Closes #49531
2019-11-29 14:20:31 +02:00
Rory Hunter f8e39d2ff1
New setting to prevent automatically importing dangling indices (#49174)
Introduce a new static setting, `gateway.auto_import_dangling_indices`, which prevents dangling indices from being automatically imported. Part of #48366.
2019-11-29 11:39:51 +00:00
Alan Woodward 770a794807
Fix BWC assertion in GetFieldMappingsResponse (#49706)
Closes #49702
2019-11-29 10:32:57 +00:00
Yannick Welsch 3ad8aa6d46
Remove obsolete resolving logic from TRA (#49685)
This stems from a time where index requests were directly forwarded to
TransportReplicationAction. Nowadays they are wrapped in a BulkShardRequest, and this logic is
obsolete.

In contrast to prior PR (#49647), this PR also fixes (see b3697cc) a situation where the previous
index expression logic had an interesting side effect. For bulk requests (which had resolveIndex
= false), the reroute phase was waiting for the index to appear in case where it was not present,
and for all other replication requests (resolveIndex = true) it would right away throw an
IndexNotFoundException while resolving the name and exit. With #49647, every replication
request was now waiting for the index to appear, which was problematic when the given index
had just been deleted (e.g. deleting a follower index while it's still receiving requests from the
leader, where these requests would now wait up to a minute for the index to appear). This PR
now adds b3697cc on top of that prior PR to make sure to reestablish some of the prior behavior
where the reroute phase waits for the bulk request for the index to appear. That logic was in
place to ensure that when an index was created and not all nodes had learned about it yet, that
the bulk would not fail somewhere in the reroute phase. This is now only restricted to the
situation where the current node has an older cluster state than the one that coordinated the
bulk request (which checks that the index is present). This also means that when an index is
deleted, we will no longer unnecessarily wait up to the timeout for the index o appear, and
instead fail the request.

Closes #20279
2019-11-29 11:01:24 +01:00
Armin Braun 459d8edcc0
Make BlobStoreRepository Aware of ClusterState (#49639)
This is a preliminary to #49060.

It does not introduce any substantial behavior change to how the blob store repository
operates. What it does is to add all the infrastructure changes around passing the cluster service to the blob store, associated test changes and a best effort approach to tracking the latest repository generation on all nodes from cluster state updates. This brings a slight improvement to the consistency
by which non-master nodes (or master directly after a failover) will be able to determine the latest repository generation. It does not however do any tricky checks for the situation after a repository operation
(create, delete or cleanup) that could theoretically be used to get even greater accuracy to keep this change simple.
This change does not in any way alter the behavior of the blobstore repository other than adding a better "guess" for the value of the latest repo generation and is mainly intended to isolate the actual logical change to how the
repository operates in #49060
2019-11-29 10:14:53 +01:00
Armin Braun cb3ba97dcc
Optimize GoogleCloudStorageHttpHandler (#49677)
Removing a lot of needless buffering and array creation
to reduce the significant memory usage of tests using this.
The incoming stream from the `exchange` is already buffered
so there is no point in adding a ton of additional buffers
everywhere.
2019-11-29 09:58:50 +01:00
Ioannis Kakavas ec8553f65e
Use PEM files instead of a JKS for key material (#49625)
So that the tests can also run in a FIPS 140 JVM, where using a
JKS keystore is not allowed.

Resolves: #49261

* resolve name collision
2019-11-29 08:54:22 +02:00
Armin Braun aef461b5b3
Fix Lucene Version Constant (#49696)
Lucene in `7.x` is at `8.4` and this constant being off is failing BwC tests.
2019-11-28 22:24:09 +01:00
pigbrain 602e589235 fix mis typo (#49689) 2019-11-28 11:57:07 -05:00
Marios Trivyzas 8ca11f54cd
[Docs] Enhance rolling upgrade guide (#49686)
Add a couple of pointers for the user to check the
overall cluster health and the version of ES running
on every node.

Fixes: #49670
2019-11-28 17:00:41 +01:00
Jim Ferenczi cab99c036a
Add a listener to track the progress of a search request locally (#49471)
This commit adds a function in NodeClient that allows to track the progress
of a search request locally. Progress is tracked through a SearchProgressListener
that exposes query and fetch responses as well as partial and final reduces.
This new method can be used by modules/plugins inside a node in order to track the
progress of a local search request.

Relates #49091
2019-11-28 14:35:35 +01:00
Przemyslaw Gomulka 7a1720c883
Enable LicenceServiceTests for all jdks (#49440)
This test no longer relies on jdk version, so the assume should be removed
relates #48209
2019-11-28 14:09:30 +01:00
Ignacio Vera eade4f03f4
New Histogram field mapper that supports percentiles aggregations. (#48580)
This commit adds  a new histogram field mapper that consists in a pre-aggregated format of numerical data to be used in percentiles aggregations.
2019-11-28 13:58:20 +01:00
Yannick Welsch a354c60722 Revert "Remove obsolete resolving logic from TRA (#49647)"
This reverts commit 6cca2b04fa.
2019-11-28 13:12:53 +01:00
Przemysław Witek e248610334
Remove ClassInfo interface and BinaryClassInfo class. (#49649) 2019-11-28 13:03:54 +01:00
Yannick Welsch 6cca2b04fa
Remove obsolete resolving logic from TRA (#49647)
This stems from a time where index requests were directly forwarded to
TransportReplicationAction. Nowadays they are wrapped in a BulkShardRequest, and this logic is
obsolete.

Closes #20279
2019-11-28 11:31:51 +01:00
Sivagurunathan Velayutham 08bf0aed43 Pure disjunctions should rewrite to a MatchNoneQueryBuilder (#48557)
Closes #48475
2019-11-28 11:00:47 +01:00
Tim Vernum d596585cd8
Cleanup test user in HLRC test (#49477)
SecurityIT.testGetUser creates a user for testing purposes, but did
not delete the user at the end of the test. This could leave the
cluster in an unexpected state for other tests.

This commit:
- Deletes the user at the end of `testGetUser`
- Adds the test-name as metadata to the users that are created in `SecurityIT`
  so that their origin is clear if they do interfere with other tests
- Enables SecurityDocumentationIT.testGetUsers on the expectation that
  the new cleanup step will resolve the unreliability of that test.

Relates: #48440
2019-11-28 14:51:01 +11:00
Ryan Ernst a9f7bfc3bd
Migrate setup passwords packaging test from bats (#49337)
This commit moves the packaging tests for elasticsearch-setup-passwords
to java from bats. The change also enables future tests to enable
security in Elasticsearch and automatically have waitForElasticsearch
work correctly, at least to the same extent it worked in bats, by
waiting on the ES port instead of health check.

relates #46005
2019-11-27 16:01:26 -08:00
Christoph Büscher c23c4ae4a4
Small fix in ICUCollationKeywordFieldMapperIT (#49656)
The test was slightly modified with #49166, the two test documents in
`testNormalization` look like they should mirror the document id in the "id"
field in order for it to work as a tie breaker.

Closes #49654
2019-11-27 21:37:30 +01:00
Ryan Ernst ffaf836e70
Make docker build task incremental (#49613)
This commits sets an output marker file for the docker build tasks so
that it can be tracked as up to date. It also fixes the docker build
context task to omit the build date as in input property which always
left the task as out of date.

relates #49359
2019-11-27 11:19:34 -08:00
Ryan Ernst 6c54b38a1b
Remove legacy referene to file scripts (#49339)
This commit removes outdated documentation about a path setting for file
scripts which no longer exist.

closes #45827
2019-11-27 10:42:15 -08:00
Ryan Ernst 0042500026
Add JAVA_HOME env override location to docs (#49565)
This commit clarifies how to override JAVA_HOME from the bundled jdk for
deb and rpm installs, which each have their own file that is sourced
upon service startup.

closes #49068
2019-11-27 10:39:54 -08:00
Christos Soulios 4b16d50cd4
Fix typo when assigning null_value in GeoPointFieldMapper (#49645)
This PR fixes a trivial typo error that affects assigning null_value in the GeoPointFieldMapper
2019-11-27 18:33:11 +02:00
Xiang Dai 7a7d15ba0b [DOCS] Clarify how to update max memory size in bootstrap checks (#48975) 2019-11-27 09:39:34 -05:00
bellengao 00cef95a77 [DOCS] Correct the request path for flush API docs (#49615) 2019-11-27 09:26:57 -05:00
Yannick Welsch a5f23758a1 [DOCS] Correct request path for synced flush API docs (#49631)
Fixes an incorrect request path added with #46634
2019-11-27 08:43:21 -05:00
glerb 815ea928b2 [Docs] Correct typo in log file name (#49620) 2019-11-27 14:38:19 +01:00
Martijn van Groningen 88aea2107d
Add templating support to pipeline processor. (#49030)
This commit adds templating support to the pipeline processor's `name` option.

Closes #39955
2019-11-27 13:45:11 +01:00
Jim Ferenczi c2deb287f1
Add a cluster setting to disallow loading fielddata on _id field (#49166)
This change adds a dynamic cluster setting named `indices.id_field_data.enabled`.
When set to `false` any attempt to load the fielddata for the `_id` field will fail
with an exception. The default value in this change is set to `false` in order to prevent
fielddata usage on this field for future versions but it will be set to `true` when backporting
to 7x. When the setting is set to true (manually or by default in 7x) the loading will also issue
a deprecation warning since we want to disallow fielddata entirely when https://github.com/elastic/elasticsearch/issues/26472
is implemented.

Closes #43599
2019-11-27 13:38:09 +01:00
Alan Woodward 35355e25f7
Remove types from internal GetFieldMappings request/response objects (#48815)
Type filters and intermediate type levels in mappings responses have already been
removed from the GetFieldMappings REST layer; we can also remove them from the
internal Node client classes.

Relates to #41059
2019-11-27 11:41:41 +00:00
Rafael Acevedo b696c928fc Update randomizedrunner to 2.7.4 (#49345)
Updates randomizedrunner from 2.7.1 to 2.7.4, which includes some fixes
related to race conditions/deadlocks.
2019-11-27 09:33:55 +00:00
Dimitrios Liappis 1c9efba809
Clarify gid used by docker image process and bind-mount method
Fix reference about the uid:gid that Elasticsearch runs as inside
the Docker container and add a packaging test to ensure that bind
mounting a data dir with a random uid and gid:0 works as
expected.

Relates #49529
Closes #47929
2019-11-27 10:36:30 +02:00
Yannick Welsch 403b9389e0
Avoid double-wrapping allocator (#49534)
When using unpooled, the allocator is wrapped twice in a NoDirectBuffers.
2019-11-27 09:24:16 +01:00
Yannick Welsch 3429f79cce
Do not mutate request on scripted upsert (#49578)
Fixes a bug where a scripted upsert that causes a dynamic mapping update is retried (because
mapping update is still in-flight), and the request is mutated multiple times.

Closes #48670
2019-11-27 09:23:42 +01:00
Martijn van Groningen 4013e814e8
Add templating support to enrich processor (#49093)
Adds support for templating to `field` and `target_field` options.
2019-11-27 07:52:42 +01:00
Tim Vernum df6e3fcfef
Add Debug/Trace logging for authentication (#49575)
Authentication has grown more complex with the addition of new realm
types and authentication methods. When user authentication does not
behave as expected it can be difficult to determine where and why it
failed.

This commit adds DEBUG and TRACE logging at key points in the
authentication flow so that it is possible to gain addition insight
into the operation of the system.

Relates: #49473
2019-11-27 13:02:07 +11:00
Tim Vernum 308ae98988
Fix iterate-from-1 bug in smart realm order (#49473)
The AuthenticationService has a feature to "smart order" the realm
chain so that whicherver realm was the last one to successfully
authenticate a given user will be tried first when that user tries to
authenticate again.

There was a bug where the building of this realm order would
incorrectly drop the first realm from the default chain unless that
realm was the "last successful" realm.

In most cases this didn't cause problems because the first realm is
the reserved realm and so it is unusual for a user that authenticated
against a different realm to later need to authenticate against the
resevered realm.

This commit fixes that bug and adds relevant asserts and tests.
2019-11-27 11:41:38 +11:00
Armin Braun 48ba7dde5c
Make BlobStoreRepository#writeIndexGen API Async (#49584)
Preliminary to shorten the diff of #49060. In #49060
we execute cluster state updates during the writing of a new
index gen and thus it must be an async API.
2019-11-26 20:58:05 +01:00