Commit graph

17630 commits

Author SHA1 Message Date
Jonathan Buttner
c7f31f5403
[ML] Migrate model_version to model_id when parsing persistent elser inference endpoints (#124769) (#124789)
* Handling model_version for prexisting endpoints

* Update docs/changelog/124769.yaml
2025-03-14 08:47:24 +11:00
Lee Hinman
b49b22d6c1
Fix changelog to make more sense for release notes (#124774)
Relates to #119743
2025-03-13 15:22:36 -06:00
Martijn van Groningen
ad12e0dabd
[8.18] Improve rolling up metrics (#124777)
Backporting #124739 to 8.18 branch.
Remove unneeded Metric abstraction in MetricFieldProducer, which speeds-up rolling up gauges/counters.
2025-03-13 21:01:53 +01:00
Alexey Ivanov
1077eacf94
System data streams are not being upgraded in the feature migration API (#123926) (#124750)
This commit adds support for system data streams reindexing. The system data stream migration extends the existing system indices migration task and uses the data stream reindex API.
The system index migration task starts a reindex data stream task and tracks its status every second. Only one system index or system data stream is migrated at a time. If a data stream migration fails, the entire system index migration task will also fail.
2025-03-14 02:06:02 +11:00
Martijn van Groningen
74f402cecb
Improve downsample performance by buffering docids and do bulk processing. (#124477) (#124696) 2025-03-13 19:59:32 +11:00
Joe Gallo
7461459c49
Fix geoip databases index access after system feature migration (take 3) (#124604) (#124679) 2025-03-13 08:56:24 +11:00
Mike Pellegrini
754f2f7ad9
[ML] Avoid potentially throwing calls to Task#getDescription in model download (#124556)
(cherry picked from commit 444b8eab75)

Co-authored-by: David Kyle <david.kyle@elastic.co>
2025-03-12 00:18:31 +11:00
Luca Cavanna
255f7fecd0
[8.18] Fix concurrency issue in ScriptSortBuilder (#123757) (#124514)
* Fix concurrency issue in ScriptSortBuilder (#123757)

Inter-segment concurrency is disabled whenever sort by field, included script sorting, is used in a search request.

The reason why sort by field does not use concurrency is that there are some performance implications, given that the hit queue in Lucene is build per slice and the different search threads don't share information about the documents they have already visited etc.

The reason why script sort has concurrency disabled is that the script sorting implementation is not thread safe. This commit addresses such concurrency issue and re-enables search concurrency for search requests that use script sorting. In addition, missing tests are added to cover for sort scripts that rely on _score being available and top_hits aggregation with a scripted sort clause.

* iter
2025-03-11 22:40:47 +11:00
Tim Grein
0aaa8cdc7d
[Inference API] Fix output stream ordering in InferenceActionProxy (#124225) (#124244) 2025-03-11 21:49:53 +11:00
Kostas Krikellas
94ebaafd79
Troubleshoot source mode deprecation warnings (#124320) (#124536)
* Update troubleshooting.asciidoc

* Create source-mode-setting.asciidoc

* Update troubleshooting.asciidoc

* Update source-mode-setting.asciidoc

* Update logs.asciidoc
2025-03-11 18:57:03 +11:00
Costin Leau
8134ee431f
ESQL: Lazy collection copying during node transform (#124424) (#124529)
* ESQL: Lazy collection copying during node transform

A set of optimization for tree traversal:
1. perform lazy copying during children transform
2. use long hashing to avoid object creation
3. perform type check first before collection checking

Relates #124395
2025-03-11 11:24:43 +11:00
Martijn van Groningen
ad6cbfaf40
Avoid reading unnecessary dimension values when downsampling (#124451) (#124468)
Read dimension values once per tsid/bucket docid range instead of for each document being processed.
The dimension value within a bucket-interval docid range is always to same and this avoids unnecessary reads.

Latency of downsampling the tsdb track index into a 1 hour interval downsample index drop by ~16% (running on my local machine).
2025-03-10 23:19:07 +11:00
Martijn van Groningen
fbc7bbc30e
[8.18] Avoid serializing empty _source fields in mappings. (#124198)
Backporting #122606 to 8.18 branch.
2025-03-08 08:44:20 +01:00
Tommaso Teofili
bccfcc4932
Do not let ShardBulkInferenceActionFilter unwrap / rewrap ESExceptions (#123890) (#124346)
* do not let ShardBulkInferenceActionFilter unwrap / rewrap ESExceptions
2025-03-08 03:59:57 +11:00
Benjamin Trent
70d7daaea0
Have create index return a bad request on poor formatting (#123761) (#124345)
closes: https://github.com/elastic/elasticsearch/issues/123661
(cherry picked from commit a1ee3c9291)
2025-03-08 03:57:36 +11:00
Kostas Krikellas
1ca82c8603
[8.x][DOCS] Document source-related restrictions (#124317) (#124324)
* Update synthetic-source.asciidoc

* Update source-field.asciidoc
2025-03-08 01:43:32 +11:00
Parker Timmins
335a1d4ff2
[8.18] Retry ILM async action after reindexing data stream (#124149) (#124270)
* Retry ILM async action after reindexing data stream (#124149)

When reindexing a data stream, the ILM metadata is copied from the index metadata of the source index to the destination index. But the ILM state of the new index can be stuck if the source index was in an AsyncAction at the time of reindexing. To un-stick the new index, we call TransportRetryAction to retry the AsyncAction. In the past this action would only run if the index were in the error phase. This change includes an update to TransportRetryAction, which allows it to be run when the index is not in an error phase, if the parameter requireError is set to false.

(cherry picked from commit 10a8dcf0fb)

# Conflicts:
#	server/src/main/java/org/elasticsearch/TransportVersions.java
#	x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/user/InternalUsers.java
#	x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/ilm/action/TransportRetryAction.java
#	x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/DataStreamsUpgradeIT.java

* index mode cannot be set on v7 indices
2025-03-07 09:43:14 +11:00
Niels Bauman
b5bb47b4f2
[8.18] Avoid hoarding cluster state references during rollover (#124107) (#124266)
# Backport

This will backport the following commits from `main` to `8.18`:  -
[Avoid hoarding cluster state references during rollover
(#124107)](https://github.com/elastic/elasticsearch/pull/124107)

<!--- Backport version: 9.6.4 -->

### Questions ? Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
2025-03-07 07:07:26 +11:00
Lisa Cawley
b95c59b290
[DOCS] Remove references to the _unified inference API (#124157) (#124254)
(cherry picked from commit 0f58537dc9)
2025-03-06 18:39:39 +01:00
Andrei Stefan
54ce18702c
ESQL: Use a must boolean statement when pushing down to Lucene when scoring is also needed (#124001) (#124120)
* Use a "must" instead of "filter" when building the pushed down filter
AND when scoring is needed
2025-03-06 23:41:45 +11:00
Benjamin Trent
1911a7d5a7
Adjust exception thrown when unable to load hunspell dict (#123743) (#124146)
On index creation, its possible to configure an hunspell analyzer, but
reference a locale file that actually doesn't exist or isn't accessible.

This error, like our other user dictionary errors, should be an IAE not
an ISE.

closes: https://github.com/elastic/elasticsearch/issues/123729
(cherry picked from commit a92b1d6892)
2025-03-06 08:02:52 +11:00
Rene Groeschke
378ae94c06
Update Gradle wrapper to 8.13 (#122421) (#123878)
* Fix Gradle Deprecation warning as declaring an is- property with a Boolean type has been deprecated.
* Make use of new layout.settingsFolder api to address some cross project references
* Fix buildParams snapshot check for multiprojet projects

(cherry picked from commit e19b2264af)

# Conflicts:
#	build-tools-internal/gradle/wrapper/gradle-wrapper.properties
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BaseInternalPluginBuildPlugin.java
#	build-tools-internal/src/main/resources/minimumGradleVersion
#	docs/build.gradle
#	gradle/wrapper/gradle-wrapper.properties
#	plugins/examples/gradle/wrapper/gradle-wrapper.properties
#	qa/lucene-index-compatibility/build.gradle
#	x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle
#	x-pack/qa/multi-project/xpack-rest-tests-with-multiple-projects/build.gradle
2025-03-05 15:57:38 +01:00
Luigi Dell'Aquila
dfc05733a5
ES|QL: fix docs for functions in PREVIEW (#123880) (#124078) 2025-03-05 22:49:22 +11:00
István Zoltán Szabó
f1aedbe851
[8.18][DOCS] Adds model_id to the default endpoint docs. (#124089) 2025-03-05 12:42:40 +01:00
Liam Thompson
cec6bda52c
[DOCS] Update connectors repo link (#124072) (#124076) 2025-03-05 20:36:56 +11:00
Benjamin Trent
ffd409956a
fix bbq memory size estimate (#124022) (#124045)
(cherry picked from commit 76cf99c11e)

Co-authored-by: weizijun <weizijun.wzj@alibaba-inc.com>
2025-03-05 07:09:19 +11:00
Pat Whelan
3801866d2b
[ML] Retry on streaming errors (#123076) (#124032)
* [ML] Retry on streaming errors (#123076)

We now always retry based on the provider's configured retry logic
rather than the HTTP status code. Some providers (e.g. Cohere,
Anthropic) will return 200 status codes with error bodies, others (e.g.
OpenAI, Azure) will return non-200 status codes with non-streaming
bodies.

Notes:
- Refactored from HttpResult to StreamingHttpResult, the byte body is
  now the streaming element while the http response lives outside the
  stream.
- Refactored StreamingHttpResultPublisher so that it only pushes byte
  body into a queue.
- Tests all now have to wait for the response to be fully consumed
  before closing the service, otherwise the close method will shut down
  the mock web server and apache will throw an error.

* [CI] Auto commit changes from spotless

* Use old isSuccess API

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-03-05 05:59:12 +11:00
Nikolaj Volgushev
37fadd7847
Drop TLS_RSA ciphers from default cipher suites for JDK 24 (#123600) (#123989)
This PR adjusts the list of supported ciphers to reflect ciphers
available in JDK 24. 

JDK 24 [drops](https://bugs.openjdk.org/browse/JDK-8245545) support for
`TLS_RSA` suites. These ciphers will no longer be supported in
Elasticsearch with a bundled JDK with version >= 24. JDK's of lower
versions will continue to support to dropped ciphers. 

I will follow up this PR with a separate docs PR.
2025-03-05 00:54:51 +11:00
elasticsearchmachine
b1ef8ce810 Prune changelogs after 8.17.3 release 2025-03-04 12:26:45 +00:00
John Wagster
20cca55f09
Update Flatten Graph Docs to Include a Real Flattened Graph 8.x (#123900) (#123921)
updated flatten graph docs to include a real flattened graph
2025-03-04 08:02:25 +11:00
Liam Thompson
237b725697
[8.x] [DOCS] Update servicenow search connector DLS limitation (#123865) (#123869) 2025-03-04 00:41:38 +11:00
Nhat Nguyen
71e769da9e
[8.18] Avoid over collecting in Limit or Lucene Operator (#123296) (#123783)
* Avoid over collecting in Limit or Lucene Operator (#123296)

Currently, we rely on signal propagation for early termination. For 
example, FROM index | LIMIT 10 can be executed by multiple Drivers:
several Drivers to read document IDs and extract fields, and the final
Driver to select at most 10 rows. In this scenario, each Lucene Driver
can independently collect up to 10 rows until the final Driver has
enough rows and signals them to stop collecting. In most cases, this
model works fine, but when extracting fields from indices in the
warm/cold tier, it can impact performance. This change introduces a
Limiter used between LimitOperator and LuceneSourceOperator to avoid
over-collecting. We will also need a follow-up to ensure that we do not
over-collect between multiple stages of query execution.

* Fix compilation after #123784

* fix compile

* fix compile
2025-03-01 17:00:04 +11:00
George Wallace
d3fec285e8
Opster paginate changes rebase (#123674) (#123786)
* This is a copy from the original ticket https://github.com/elastic/elasticsearch/pull/120171

* Update docs/reference/search/search-your-data/paginate-search-results.asciidoc



---------

Co-authored-by: Kofi B <kofi.bartlett@elastic.co>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-03-01 12:54:04 +11:00
George Wallace
3397806d00
[DOCS] Update put mapping intro (#120248) (#123685)
Co-authored-by: Kofi B <kofi.bartlett@elastic.co>
2025-02-28 20:55:57 +11:00
Yang Wang
5ce6331cf1
Abort pending deletion on IndicesService stop (#123569) (#123669)
When IndicesService is closed, the pending deletion may still be in
progress due to indices removed before IndicesService gets closed. If
the deletion stucks for some reason, it can stall the node shutdown.
This PR aborts the pending deletion more promptly by not retry after
IndicesService is stopped.

Resolves: #121717 Resolves: #121716  Resolves: #122119
(cherry picked from commit c7e7dbe904)

# Conflicts:
#	muted-tests.yml
2025-02-28 13:21:47 +11:00
Luca Cavanna
e9c3c63958
Disable concurrency when top_hits sorts on anything but _score (#123610) (#123641)
We already disable inter-segment concurrency in SearchSourceBuilder whenever
the top-level sort provided is not _score. We shoudl apply the same rules
in top_hits. We recenly stumbled upon non deterministic behaviour caused by
script sorting defined within top hits. That is to be expected given that
script sorting does not support search concurrency.

The sort script can be replaced with a runtime field, either defined in the
mapping or in the search request, which does support concurrency and guarantees
predictable behaviour.
2025-02-28 08:40:08 +11:00
John Verwolf
04917e1118
Add deprecation warning to TransportHandshaker (#123188)
This PR adds a deprecation warning log to the TransportHandshaker when connecting with nodes < v8.18.
2025-02-27 08:51:01 -08:00
Keith Massey
7e24885566
[8.18] Fixing serialization of ScriptStats cache_evictions_history (#123384) (#123613)
* Fixing serialization of ScriptStats cache_evictions_history (#123384)

(cherry picked from commit 88cf2487e7)

# Conflicts:
#	server/src/main/java/org/elasticsearch/script/ScriptStats.java

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-02-28 03:38:03 +11:00
Costin Leau
40d51db037
ESQL: Reduce iteration complexity for plan traversal (#123427) (#123534)
(cherry picked from commit e4604a4432)
2025-02-27 04:52:26 +11:00
Ioana Tagirta
5ad193ce20
Remove references to doc types in percolator docs (#123508) (#123528) 2025-02-27 03:26:30 +11:00
David Turner
54dc2db15f
Small resiliency status update (#123497) (#123499) 2025-02-27 02:15:53 +11:00
Joe Gallo
1cba95e807
Use ordered maps for PipelineConfiguration xcontent deserialization (#123403) (#123412) 2025-02-26 08:36:56 +11:00
David Turner
3df75e008e
Reduce licence checks in LicensedWriteLoadForecaster (#123369) (#123407)
Rather than checking the license (updating the usage map) on every
single shard, just do it once at the start of a computation that needs
to forecast write loads.

Backport of #123346 to 8.x
Closes #123247
2025-02-26 07:08:22 +11:00
Marci W
174195563a
Update doc-values.asciidoc (#123309) 2025-02-25 08:33:24 -05:00
Joe Gallo
44ddc55b75
Register IngestGeoIpMetadata as a NamedXContent (#123079) (#123327) 2025-02-25 13:07:56 +11:00
Fang Xing
b343735829
[ES|QL] Implicit numeric casting for CASE/GREATEST/LEAST (#122601) (#123305)
* implicit numeric casting for conditional functions

(cherry picked from commit 412e6c2b39)

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
2025-02-25 07:54:34 +11:00
Pat Whelan
f9410a5e10
[ML] Set Connect Timeout to 5s (#123272) (#123300)
Reduced connection timeout from infinite to a system configurable
setting that defaults to 5s.

Increased EIS auth token timeout from 30s to 1m.
2025-02-25 06:18:06 +11:00
Nhat Nguyen
a46920e163
Fix early termination in LuceneSourceOperator (#123197) (#123292)
The LuceneSourceOperator is supposed to terminate when it reaches the 
limit; unfortunately, we don't have a test to cover this. Due to this
bug, we continue scanning all segments, even though we discard the
results as the limit was reached. This can cause performance issues for
simple queries like FROM .. | LIMIT 10, when Lucene indices are on the
warm or cold tier. I will submit a follow-up PR to ensure we only
collect up to the limit across multiple drivers.
2025-02-25 05:13:55 +11:00
David Turner
3537fe721c
Deduplicate allocation stats calls (#123267) (#123279)
These things can be quite expensive and there's no need to recompute
them in parallel across all management threads as done today. This
commit adds a deduplicator to avoid redundant work.

Backport of #123246 to `8.x`
2025-02-25 03:47:17 +11:00
Oleksandr Kolomiiets
3170bc2564
fix stale data in synthetic source for string stored field (#123105) (#123275)
Co-authored-by: jeffganmr <106223805+jeffganmr@users.noreply.github.com>
2025-02-25 03:40:38 +11:00