Commit Graph

58992 Commits

Author SHA1 Message Date
Mark Vieira 823b3cdfa8 Remove dependency on azure shadowjar since it's no longer required 2021-05-27 10:40:08 -07:00
James Rodewig c5b9fdea5b
[DOCS] Update backport policy for known issues (#73489) 2021-05-27 12:23:44 -04:00
Rene Groeschke 4dd2939056
Shadowed dependencies should be hidden from pom dependencies (#73467) 2021-05-27 08:23:50 -07:00
Mark Vieira 2d6c5e838f
Disable transitive dependencies when resolving bwc JDBC driver artifact (#73448) 2021-05-27 08:18:07 -07:00
Mark Vieira ef2b231e3e
Print full JVM implementation version at start of build (#73439) 2021-05-27 08:14:19 -07:00
James Rodewig 2fca666b47
[DOCS] Update snapshot/restore for data stream aliases (#73438)
In 7.14+, you can now create data stream aliases. This updates the related
snapshot/restore documentation.
2021-05-27 10:57:06 -04:00
Ryan Ernst 6c4c4a0ecb
Upgrade Azure SDK and Jackson (#72833) (#72995)
This commit upgrades the Azure SDK to 12.11.0 and Jackson to 2.12.2. The
Jackson upgrade must happen at the same time due to Azure depending on
this new version of Jackson.

closes #66555
closes #67214

Co-authored-by: Francisco Fernández Castaño <francisco.fernandez.castano@gmail.com>
2021-05-27 07:55:18 -07:00
James Rodewig d405d99b3e
[DOCS] Fix typo (#73337) (#73474)
Co-authored-by: Li-Heng Yu <007seadog@gmail.com>
2021-05-27 10:23:18 -04:00
James Rodewig 4e6e3fb51d
[DOCS] Fix typo (#73444) (#73472)
Co-authored-by: Kevin Lowe <kevin@meetsoci.com>
2021-05-27 09:36:18 -04:00
James Rodewig cd152142c4
[DOCS] Update alias security for data stream aliases (#73436)
In 7.14+, you can create data stream aliases. This updates the related security documentation. It also streamlines the docs to remove redundant examples.
2021-05-27 09:29:44 -04:00
Armin Braun 14a31b9813
Fix Bug with Concurrent Snapshot and Index Delete (#73456)
Fixes the incorrect assumption in the snapshot state machine that a finished
snapshot delete could only start shard snapshots: in fact it can also move
snapshots to a completed state.
2021-05-27 13:26:26 +01:00
Adam Locke 3d36df5cbd
[DOCS] Move common scripting use cases up a level (#73445) 2021-05-27 07:38:55 -04:00
Martijn van Groningen bbb25a01ce
Add more validation for data stream aliases. (#73416)
Currently when attempting to an alias to points to both data streams and regular indices
the alias does get created, but points only to data streams. With this change attempting
to add such aliases results in a client error.

Currently when adding data stream aliases with unsupported parameters (e.g. filter or routing)
the alias does get created, but without the unsupported parameters. With this change
attempting to create aliases to point to data streams with unsupported parameters will result
in a client error.

Relates to #66163
2021-05-27 13:22:01 +02:00
Yang Wang 8dbec280b3
[Docs] Add metadata to GrantApiKey rest api page (#73451)
This PR adds the missing doc update to the grant api key rest api page
for the new API key metadata field added by #70292

Relates: #48182
2021-05-27 20:59:23 +10:00
Armin Braun b8fb1eb33d
Make ShardGenerations Immutable (#73452)
This object should be completely immutable. Also added a useful
assertion that makes sure we don't accidentally overwrite a valid
generation with `null` when dealing dealing failed status updates.
2021-05-27 10:57:48 +02:00
Tanguy Leroux eb7480ed11
More precise total data set size verification in FrozenSearchableSnapshotsIntegTests (#73243)
In #70625 we added the total data set size of shards 
to the Indices Stats API and we enhanced the test 
testCreateAndRestorePartialSearchableSnapshot to 
also verify the correctness of this data set size.

Because restoring a searchable snapshot shard 
creates a new in-memory segment size, the 
verification of the data set size was implemented 
in an approximative fashion: between the 
expected size and twice the expected size. This 
approximation sometimes fails for shards that 
have no documents indexed (see #73194).

This commit changes the test so that it now 
verifies the exact data set size returned by the 
Indices Stats API, which should be the sum of 
the original expected size of the snapshotted 
size + the length of the extra segment file in 
memory.

Closes #73194
2021-05-27 09:13:42 +02:00
Julie Tibshirani 67680dbc49 Unmute field collapsing and search_after REST test 2021-05-26 17:16:34 -07:00
Yang Wang 06e9fa557e
Service Accounts - add service token type to audit log (#73399)
Add authentication.token.type to audit log. This is to complement the
authentication.token.name field added by #72198. The log is now unambiguous
about exactly where the service token is from. It also helps if we decide to
log additional information for other types of tokens in future.

Relates: #73135, #72198
2021-05-27 10:15:29 +10:00
Julie Tibshirani aa94cd5212
Make sure to return total hits when field collapsing (#73298)
Previously, we would always return 0 total hits when there were no groups. Now
that collapsing supports search_after, it's possible for total hits to be
greater than 0 but no groups to return.

This PR also fixes a test bug where we set the wrong missing value for sorting
on doubles.

Fixes #73270.
2021-05-26 15:46:54 -07:00
Adam Locke 4e73d2af10
[DOCS] Make audit event types more readable (#73352)
* [DOCS] Changing event table to a list for easier viewing

* Make audit event types more readable

* Adding system_access_granted user and cross-links

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-05-26 16:57:05 -04:00
Mark Vieira 74270bed2d Revert "Bump minimum compiler version to Java 16 (#71989)"
This reverts commit bc9521e9
2021-05-26 12:40:29 -07:00
David Turner 9f4d5f85f8
Improve failure logging in testCorruptTranslogFiles (#73431)
Includes the full cluster allocation explain output in the assertion
failure message so we can see the state of the world on a failure.

Relates #72849
2021-05-26 19:23:49 +01:00
Julie Tibshirani 9e52b290ab
Remove duplicate XCombinedFieldQuery (#73183)
This query was copied from Lucene and can be removed now that we've upgraded
to a Lucene 8.9 snapshot.
2021-05-26 11:04:13 -07:00
Ignacio Vera 409b6cefe3
Add painless script support for geo_shape field (#72886)
Users can access the centroid, bounding box and dimensional type of the shape.
2021-05-26 18:55:45 +02:00
Alan Woodward 1b060a2de5
Search analyzer should default to configured index analyzer over default (#73359)
When a search or search_quote analyzer on a text mapper is not defined,
we fallback to a configured default search/search_quote analyzer if it
exists. However, if an index analyzer has been configured on the mapper
then we should first fall back to that.

Fixes #73333
2021-05-26 17:03:38 +01:00
Mark Vieira 76088da234 Add JAVA15_HOME to packer_cache.sh script 2021-05-26 07:57:23 -07:00
David Roberts b44ea7b949
[ML] Further increase memory estimates for categorization (#73370)
Memory estimates for categorization were increased in #68859,
but testing has shown some data sets where categorization
legitimately creates far more categories that usual.

This change doubles the categorization memory estimate to
20MB per partition, and also applies the multiplier when
stop-on-warn is disabled to single partition categorization
(where it is not possible to enable stop-on-warn).
2021-05-26 15:53:49 +01:00
David Roberts ca6c7e4086
[ML] Reduce warning logging from get categories Grok pattern creation (#73373)
The Grok pattern creator used within the get categories action
works by looking at the examples for each category. Sometimes
these examples are truncated, and cannot be used for Grok pattern
determination. Previously when this happened we would log a warning,
but that caused a feedback loop in the case where the Elasticsearch
logs themselves were being categorized: the warning messages would
end up creating new categories in the Elasticsearch log categorization,
with very long examples that would be truncated, leading to the same
problem occurring yet again.

This change reduces the warning log to trace for truncated log
messages, and also removes the example from the log message to
shorten it.
2021-05-26 15:43:53 +01:00
James Rodewig 2aa4c3602b [DOCS] Fix typos 2021-05-26 09:43:26 -04:00
James Rodewig 325406235a [DOCS] Change 'wildcard expression' to 'wildcard pattern' 2021-05-26 09:20:46 -04:00
Przemysław Witek 7e3f098dcf
[Transform] Revamp transform config and query validation code (#72526) 2021-05-26 13:49:54 +02:00
Armin Braun ddc3744b16
Speed up Maps.copyMapWithAddedEntry to Speed up ITs (#73308)
This method is taking about 4% of CPU time with internal cluster tests
for me. 80% of that were coming from the slow immutability assertion,
the rest was due to the slow way we were building up the new map.
The CPU time slowness likely translates into outright test slowness,
because this was mainly hit through adding transport handlers when starting
nodes (which happens on the main test thread).

Fixed both to save a few % of test runtime.
2021-05-26 12:54:26 +02:00
István Zoltán Szabó 0bb41ba4f8
[DOCS] Adds screenshots to Transform examples (#72939)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-05-26 12:06:54 +02:00
Martijn van Groningen 628980c1e0
Data stream aliases and action request's includeDataStreams flag. (#73266)
When data stream aliases are resolved then the includeDataStreams flag of an action request should be taken into account,
so that data stream aliases aren't resolved to backing indices for apis that don't support data streams.

Closes #73195
2021-05-26 10:07:12 +02:00
Tanguy Leroux 8c5f50f55c
Do not remove write block when unfreezing cold/frozen indices (#73368)
Unfreezing a snapshot backed index does not work well 
because the unfreeze action always removes the 
index.blocks.write block, causing shards to be failed 
when the cluster state is applied on data nodes. This 
is because searchable snapshots shards always 
expect the index.blocks.write to be set to true.

This commit changes the freeze/unfreeze action 
so that the write block is not removed when 
unfreezing searchable snapshots indices. It also 
changes the toggling of index.frozen and 
index.search.throttled settings so that they are 
just removed (instead of being turned to false) 
when unfreezing.
2021-05-26 09:40:28 +02:00
Marios Trivyzas 1a2a3df78b
SQL: Fix issue with aliased subqueries and GROUP BY (#73233)
Previously, when a subquery was used with an alias in combination with
a nested GROUP BY, the collapsing of the nested queries into a flattened
`Aggregate` query, lead to wrong attribute qualifier on the external
projection, which was still referencing the removed subquery. e.g.:

For the following query:
```
SELECT languages FROM (
    SELECT languages FROM test_emp GROUP BY languages
) AS subquery
```
The `languages` of the top level SELECT, was qualified with `subquery`
which was removed during the flattening optimisation leading to
Exception of not being able to resolve the refenced group:
`test_emp.languages`.

Fix this behaviour by introducing a new rule which precedes the
`PruneSubqueryAliases` rules and updates the `qualifier` for the
`FieldAttributes`.

Fixes: #69263
2021-05-26 08:39:35 +02:00
Tamara Braun 35584d9fdd
Make RBACEngine.resolveAuthorizedIndicesFromRole Return Set for Lookups (#72598)
This changes the result of AuthorizationEngine.loadAuthorizedIndices
(and dependent methods) from List<String> to Set<String>.

This has the following performance benefits:
1. `contains` checks are faster
2.  RBACEngine always formed this collections as a Set, so this
    change reduces unnecessary copying.

An additional performance improvement was added when resolve authorized
index names for data streams.
2021-05-26 16:25:53 +10:00
Ignacio Vera 157f5336db
speed up geotile aggregation over geo_shape field (#72984)
compute the range of tiles that needs to be added instead of using recursion.
2021-05-26 07:16:17 +02:00
Yang Wang b58dfee5ee
Service Accounts - Add token source to authenticate metadata (#73135)
Service token of the same name can come from either a file or the
security index. Add the token source information to the authentication
metadata to differentiate between them. This information is also
serialised under token.type in the rest response back to users.
2021-05-26 13:48:15 +10:00
Yang Wang 7f8ee2ab56
Service Accounts - show token name for name validation failures (#73131)
The code now shows the exact token name when it fails to validate. So
it is no longer needed to guess the actual failure.
2021-05-26 10:44:21 +10:00
Mark Vieira 8b0f88433b Use OpenJDK15 for building BWC branches 2021-05-25 16:43:40 -07:00
Mark Vieira 034cd45e54 Add JAVA15 environment variable for EAR CI job 2021-05-25 16:39:46 -07:00
Mark Vieira 980fd73c01 Add JAVA15 environment variable for required CI builds 2021-05-25 16:38:41 -07:00
William Brafford 584974ef13
Validate that system indices aren't also hidden indices (#72768)
* Validate that system indices aren't also hidden inidices
* Remove hidden from ingest geo system index
* Add test coverage
* Remove hidden setting from system index even if not upgrading
2021-05-25 16:45:49 -04:00
James Rodewig 39a0314d30
[DOCS] Update alias xrefs (#73380)
Updates several internal 'alias' xrefs to point to the aliases guide rather than
API docs.
2021-05-25 16:19:00 -04:00
Mark Vieira bc9521e9b0
Bump minimum compiler version to Java 16 (#71989) 2021-05-25 12:43:20 -07:00
David Turner 221c571761
Fix location of repository analyzer API spec (#73378)
The repository analyzer API spec was incorrectly stored in the plugin
directory rather than in the main `rest-api-spec` directory. This commit
fixes that.
2021-05-25 20:23:12 +01:00
Adam Locke 89ed0c8e29
[DOCS] Expand information on using a runtime field without a script (#73219)
* [DOCS] Expand information on when to use a runtime field without a script

* Reworking information based on review feedback

* Clarify case where doc_values are disabled

* A few minor changes from review feedback
2021-05-25 15:09:31 -04:00
Adam Locke 13b8715a56
[DOCS] Adding redirect for cross-link from Cloud (#73351) (#73383) 2021-05-25 15:07:35 -04:00
Adam Locke 0336e012ee
[DOCS] Update bi-directional CCR note (#72266)
* [DOCS] Update bi-directional CCR note

* Integrating note with a new sub-section

* Add "particularly"
2021-05-25 14:23:58 -04:00