Commit graph

81332 commits

Author SHA1 Message Date
Ryan Ernst
2466f90ec2
Workaround max name limit imposed by Jackson 2.17 (#126806) (#126873)
In Jackson 2.15 a maximum string length of 50k characters was
introduced. We worked around that by override the length to max int on
all parsers created by xcontent. Jackson 2.17 introduced a similar limit
on field names. This commit mimics the workaround for string length by
overriding the max name length to be unlimited.

relates #58952

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-19 08:46:16 +10:00
elasticsearchmachine
416a7c9bd1 Finalize release notes for v8.17.5 2025-04-18 01:55:32 +10:00
Carson Ip
c8760c3e0f
[otel-data] Bump plugin version to release _metric_names_hash changes (#126850) (#126900)
Bump otel-data plugin version as #120952 missed the bump.

(cherry picked from commit 5860ccb113)
2025-04-17 11:02:58 +01:00
Luca Cavanna
6773ae1d97
Cancel expired async search task when a remote returns its results (#126583) (#126931)
A while ago we enabled using ccs_minimize_roundtrips in async search.
This makes it possible for users of async search to send a single search
request per remote cluster, and minimize the impact of network latency.

With non minimized roundtrips, we have pretty recurring cancellation checks:
as part of the execution, we detect that a task expired whenever each shard comes
back with its results.

In a scenario where the coord node does not hold data, or only remote data is
targeted by an async search, we have much less chance of detecting cancellation
if roundtrips are minimized. The local coordinator would do nothing other than
waiting for the minimized results from each remote cluster.
One scenario where we can check for cancellation is when each cluster comes
back with its full set of results. This commit adds such check, plus some testing
for async search cancellation with minimized roundtrips.
2025-04-17 06:51:24 +10:00
Ryan Ernst
49eba87a0e
Fix uniquify to handle multiple successive duplicates (#126889) (#126954)
CollectionUtils.uniquify is based on C++ std::unique. However, C++
iterators are not quite the same as Java iterators. In particular,
advancing them only allows grabbing the value once. This commit reworks
uniquify to be based on list indices instead of iterators.

closes #126883
2025-04-17 06:16:38 +10:00
Jonathan Buttner
b30f6a04ee
[ML] Refactor inference request executor to leverage scheduled execution (#126858) (#126950)
* Using threadpool schedule and fixing tests

* Update docs/changelog/126858.yaml

* Clean up

* change log

(cherry picked from commit 7a0f63c1a0)

# Conflicts:
#	x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/sender/HttpRequestSenderTests.java
2025-04-17 06:10:14 +10:00
Jonathan Buttner
da9e149a03
[ML] Adding missing onFailure call for Inference API start model request (#126930) (#126945)
* Adding missing onFailure call

* Update docs/changelog/126930.yaml
2025-04-17 05:18:34 +10:00
Lorenzo Dematté
f333089b04
Fix vec_caps to test for OS support too (on x64) (#126911) (#126925)
On x64, we are testing if we support vector capabilities (1 = "basic" = AVX2, 2 = "advanced" = AVX-512) in order to enable and choose a native implementation for some vector functions, using CPUID.

However, under some circumstances, this is not sufficient: the OS on which we are running also needs to support AVX/AVX2 etc; basically, it needs to acknowledge it knows about the additional register and that it is able to handle them e.g. in context switches. To do that we need to a) test if the CPU has xsave feature and b) use the xgetbv to test if the OS set it (declaring it supports AVX/AVX2/etc).

In most cases this is not needed, as all modern OSes do that, but for some virtualized situations (hypervisors, emulators, etc.) all the component along the chain must support it, and in some cases this is not a given.

This PR introduces a change to the x64 version of vec_caps to check for OS support too, and a warning on the Java side in case the CPU supports vector capabilities but those are not enabled at OS level.

Tested by passing noxsave to my linux box kernel boot options, and ensuring that the avx flags "disappear" from /proc/cpuinfo, and we fall back to the "no native vector" case.

Fixes #126809
2025-04-17 03:09:37 +10:00
Mariusz Józala
3d598a99ec
[Tests] Do not add bugfix2 for BwC (#126926)
Also, add 8.16 branch to be still tested as "bugfix".
For 8.17 there is currently no bugfix2 version.
We test it against 8.16.7 and 7.17.29 in BwC tests.
2025-04-16 17:51:27 +02:00
Brian Seeders
c599d24734
Update branches.json 2025-04-15 12:42:34 -04:00
elasticsearchmachine
44d9592a15 Prune changelogs after 8.17.5 release 2025-04-15 14:48:41 +00:00
elasticsearchmachine
533ea966b5 Bump versions after 8.17.5 release 2025-04-15 14:47:42 +00:00
Artem Shelkovnikov
75f35697a5
Document known limitation for Salesforce connector #9545 (#126791) (#126823) 2025-04-15 19:09:40 +10:00
elasticsearchmachine
b46bf87caf
Update docs for v8.17.5 release (#126736)
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-04-15 10:39:36 +02:00
Kofi B
a5abd1a247
[DOCS] Rewrite of sizing your shards-rebase (#124444)
* Edits copied over from https://github.com/elastic/elasticsearch/pull/120346

* Update docs/reference/how-to/size-your-shards.asciidoc

Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>

* Improve Scanability

Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>

* Reduced what is a shard section for concision

* Adjusted title

* Add general and distribution sizing guidelines.

---------

Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
Co-authored-by: George Wallace <georgewallace@users.noreply.github.com>
2025-04-14 17:38:50 +02:00
Liam Thompson
30868d30ed
[8.17] ESQL: Known issue enrich missing field (#126701) (#126760)
* ESQL: Known issue enrich missing field (#126701)

* Add known issue note to 8.17.0-8.17.4

* Add known issue to 8.16.0-8.16.6

* remove coming tags from notes that hadn't been forward ported to 8.x

* remove another coming tag

* clarify it's esql

* include pages that hadn't been forward ported

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Liam Thompson <leemthompo@gmail.com>
(cherry picked from commit f7a52054b2)

# Conflicts:
#	docs/reference/release-notes.asciidoc
#	docs/reference/release-notes/8.17.2.asciidoc
#	docs/reference/release-notes/8.17.3.asciidoc
#	docs/reference/release-notes/8.17.4.asciidoc

* delete 8.18 includes from 8.17 branch

---------

Co-authored-by: Alexander Spies <alexander.spies@elastic.co>
2025-04-14 19:17:56 +10:00
David Turner
e930e9fd4e
Fix race condition in RestCancellableNodeClient (#126686) (#126700)
Today we rely on registering the channel after registering the task to
be cancelled to ensure that the task is cancelled even if the channel is
closed concurrently. However the client may already have processed a
cancellable request on the channel and therefore this mechanism doesn't
work. With this change we make sure not to register another task after
draining the registrations in order to cancel them.

Closes #88201
2025-04-12 02:10:17 +10:00
Aurélien FOUCRET
b5ad5d9dcd
Fix LTR rescorer with model alias (#126273) (#126658) 2025-04-11 18:28:54 +10:00
Larisa Motova
9ecd7a97f3
Update keyword documentation for logsdb (#126652) (#126662)
This commit adds a note that ignore_above has a different limit for
logsdb indices to the documentation. Also specifies that ignore_above
applies to all types of the keyword family.

Relates https://github.com/elastic/sdh-elasticsearch/issues/8892
2025-04-11 18:18:57 +10:00
Mariusz Józala
55fce5db33
[CI] Use official UBI9 image for testing (#126455) (#126507)
Internal UBI images from `docker.elastic.co` are planned to be removed.
2025-04-09 18:44:21 +10:00
Alexander Spies
634048d29f
ESQL: Fix usage of already released null block in ValueSourceReaderOperator (#126411) (#126476)
* Add yaml test with reproducer
* Fix the bug
* Make ComputeBlockLoaderFactory Releasable
2025-04-09 02:34:52 +10:00
Valeriy Khakhutskyy
afd2b61e3d
[ML] Unmute fixed DFA IT tests (#126408) 2025-04-08 13:36:16 +02:00
Slobodan Adamović
65d152640b
Set keyUsage for generated HTTP certificates and self-signed CA (#126376) (#126448)
* Set `keyUsage` for generated HTTP certificates and self-signed CA (#126376)

The `elasticsearch-certutil http` command, and security auto-configuration,
generate the HTTP certificate and CA without setting the `keyUsage` extension.

This PR fixes this by setting (by default):
- `keyCertSign` and `cRLSign` for self-signed CAs
- `digitalSignature` and `keyEncipherment` for HTTP certificates and CSRs

These defaults can be overridden when running `elasticsearch-certutil http`
command. The user will be prompted to change them as they wish.

For `elasticsearch-certutil ca`, the default value can be overridden by passing
the `--keysage` option, e.g.
```
elasticsearch-certutil ca --keyusage "digitalSignature,keyCertSign,cRLSign" -pem
```

Fixes #117769

(cherry picked from commit 284121ad9f)

# Conflicts:
#	docs/reference/elasticsearch/command-line-tools/certutil.md

* fix compilation error

* [CI] Auto commit changes from spotless

* fix failing test

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-04-08 20:47:15 +10:00
kosabogi
309d169686
Adds note on anomaly detection alert behaviour (#126102) (#126443)
* Adds note on anomaly detection alert behaviour

* Fixes attribute

* Relocating the addition

* Fixes based on feedback
2025-04-08 15:59:21 +10:00
Mike Pellegrini
73407c9b43
Update InferenceException to retain top-level message (#126345) (#126406) 2025-04-08 00:15:06 +10:00
Bogdan Pintea
6792d0ddd4
[8.x] SQL: Docs: Drop examples of LIKE/RLIKE vs QUERY/MATCH equivalence #125970 (#126399)
Backport of #125673
2025-04-07 22:42:33 +10:00
Bogdan Pintea
d832cb62d0
[8.x] ESQL: supplement docs on LIMIT (#125967) (#126396)
Backport of #125839.
2025-04-07 22:11:08 +10:00
Brian Seeders
33e4bab75f
[CI] Trigger FIPS PR tests when test-fips label is present (#126332) (#126336)
(cherry picked from commit 5706e075ad)
2025-04-04 17:47:41 -04:00
Brian Seeders
a58eee423f
Update .backportrc.json 2025-04-04 16:51:23 -04:00
Chris Hegarty
0c068d113d Revert "Enable madvise by default for all builds (#110159)" (#126308)
This reverts commit 4a77e06. We've seen a significant performance degradation in merging vectors resulting from the use of MADV_RANDOM and MGLRU ( and LRU in recent Linux kernels )

For the 8.x release train, then we will revert the change that enabled MADV_RANDOM. And backport to all shipping 8.x bugfix releases.

relates: #124499
2025-04-04 17:17:53 +01:00
Jan Kuipers
7eb8224834
Fix deploying custom models with adaptive allocations (#126276) (#126318) 2025-04-05 03:04:54 +11:00
Stef Nestor
1a124eba49
Backport docs-content#962 (#126242) (#126248)
* Backport docs-content#962

---------

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2025-04-04 07:46:00 +11:00
István Zoltán Szabó
4935a159b6
[8.x][DOCS] Fixes typo on built-in role page. (#126211) (#126218) 2025-04-04 00:53:22 +11:00
Richard Dennehy
b11274c14d
Fix NPE for missing Content Type header in OIDC Authenticator (#126191) (#126206)
* Fix NPE for missing Content Type header in OIDC Authenticator

* Update docs/changelog/126191.yaml
2025-04-04 00:01:13 +11:00
Alexander Spies
0887ccf5df
[8.17] ESQL: ESQL: Fix ReplaceMissingFieldsWithNull (#125764) (#126187)
* [8.18] ESQL: ESQL: Fix ReplaceMissingFieldsWithNull (#125764) (#126166)

* Revert changes to Layout.java

The change in 80125a4bac is a quick fix
and allows breaking an invariant of Layout. Revert that.

* Simplify ReplaceMissingFieldWithNull

When encountering projections, it tries to do the job of field
extraction for missing fields by injecting an Eval that creates a
literal null with the same name id as the field attribute for the
missing field. This is wrong:
1. We only insert an Eval in case that a Project relies on the missing
   attribute. There could be other plan nodes that rely on the missing
   attribute.
2. Even for Projects, we only insert an Eval in case we squarely project
   for the field - in case of aliases (e.g. from RENAME), we do nothing.
3. In case of multiple Projects that use this attribute, we create
   multiple attributes with the original field attribute's id, causing
   a wrong Layout. This triggered
   https://github.com/elastic/elasticsearch/issues/121754.

* Revive logic for EsRelation instead of Project

* Update LocalLogicalPlanOptimizerTests

* Update test expectations

* Do not prune attributes from EsRelation

This can lead to empty output, which leads to the EsRelation being
replaced by a LocalRelation with 0 rows.

* Add tests + capability

* Add comments

* [CI] Auto commit changes from spotless

* Update docs/changelog/125764.yaml

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
(cherry picked from commit 96ca13aaee)

# Conflicts:
#	x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join.csv-spec
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/local/ReplaceMissingFieldWithNull.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/Layout.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalLogicalPlanOptimizerTests.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LocalPhysicalPlanOptimizerTests.java

* Re-instate fix for LOOKUP JOIN, update tests
2025-04-03 21:26:05 +11:00
Joe Gallo
aee9aa484f
[8.17] Minor docs fixes (#126144) (#126153) 2025-04-02 13:02:08 -04:00
Luca Cavanna
00fc9cd973
Re-enable parallel collection for field sorted top hits (#125916) (#126014)
With #123610 we disabled parallel collection for field and script sorted top hits,
aligning its behaviour with that of top level search. This was mainly to work around
a bug in script sorting that did not support inter-segment concurrency.

The bug with script sort has been fixed with #123757 and concurrency re-enabled for it.

While sort by field is not optimized for search concurrency, top hits benefits from it
and disabling concurrency for sort by field in top hits has caused performance
regressions in our nightly benchmarks.

This commit re-enables concurrency for top hits with sort by field is used. This
introduces back a discrepancy between top level search and top hits, in that concurrency
is applied for top hits despite sort by field normally disables it. The key difference
is the context where sorting is applied, and the fact that concurrency is disabled
only for performance reasons on top level searches and not for functional reasons.
2025-04-01 19:48:18 +11:00
Rene Groeschke
17d29f1027
[CI] Fix LegacyYamlRestTestPluginFuncTest failure for not available java toolchain (#125976) (#125984)
Wire in toolchain plugins into AbstractRestResourcesFuncTest to allow
resolving jdk

fixes #125534 , #125533 ,  #125532, #125531
2025-03-31 21:40:57 +02:00
Luca Cavanna
2a1adad356
Address precision issue in IndexDiskUsageAnalyzerTests#testCompletionFields (#125849) (#125951) (#125963)
We have some tolerance wound how many bytes we report for these completion fields. But the
values depend on the distribution of the random values that determine how many docs get
an option field. This commit makes the test more precise by computing the real ratio
between docs that have the optional field and the total number of docs, so that we
can base assertion on more realistic expectations.

Closes #123269
2025-04-01 03:20:58 +11:00
Niels Bauman
05fe506d21
Fix some yamlRestTestV7CompatTest tests (#125682) (#125950)
The V7 REST compat tests shouldn't run with queryable built-in roles
enabled.

Relates #120323

Fixes #121501
Fixes #122226
Fixes #122687
Fixes #123081
Fixes #123147

(cherry picked from commit a3b9b98b51)

# Conflicts:
#	muted-tests.yml
#	x-pack/plugin/build.gradle
2025-04-01 02:01:52 +11:00
Luke Whiting
d6311ef943
Update missed documentation change for new watcher index settings (#125758) (#125926)
* Update missed documentation change for new watcher index settings

* Update docs/reference/rest-api/watcher/update-settings.asciidoc



---------

Co-authored-by: Keith Massey <keith.massey@elastic.co>
2025-03-31 20:55:32 +11:00
Dimitris Rempapis
e728d46a60
[8.x] Support 7x segments as archive in 8x / 9x (#125389) (#125918)
Support 7x segments as archive in 8x / 9x - backport to 8.x
2025-03-31 20:12:48 +11:00
Pat Whelan
360737b176
Fixing bug with bedrock client caching (#118177) (#125840)
* Fixing bug with bedrock client caching

* Update docs/changelog/118177.yaml

* PR feedback

Co-authored-by: Ying Mao <ying.mao@elastic.co>
2025-03-28 10:59:07 -04:00
Valeriy Khakhutskyy
1fc6e46e1f
[ML] Increasing timeout for DFA integration tests #125510 (#125644)
Increase waiting time to prevent DFA integration tests from timing out.

(cherry picked from commit d9008cd065)

# Conflicts:
#	x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/MlNativeDataFrameAnalyticsIntegTestCase.java
2025-03-26 21:00:15 +11:00
elasticsearchmachine
be6bde4dba Prune changelogs after 8.17.4 release 2025-03-25 15:24:34 +00:00
elasticsearchmachine
635f64d21f Bump versions after 8.17.4 release 2025-03-25 15:23:21 +00:00
elasticsearchmachine
718d03ccbf Prune changelogs after 8.16.6 release 2025-03-25 12:25:25 +00:00
elasticsearchmachine
d8f3571eea Bump versions after 8.16.6 release 2025-03-25 12:23:43 +00:00
elasticsearchmachine
5afd89c1bc
Add release notes for v8.17.4 release (#125450) 2025-03-24 15:30:37 +01:00
Simon Cooper
dd3b980e8d
Re-enable SIMD operations on JDK 24 (#125484) (#125494) 2025-03-25 01:22:47 +11:00