Commit graph

17057 commits

Author SHA1 Message Date
Mark Tozzi
cf36d97a32
Aggregations cancellation after collection (#120944) (#121936)
This PR addresses issues around aggregations cancellation, mentioned in https://github.com/elastic/elasticsearch/issues/108701 and other places. In brief, during aggregations collection time, we respect cancellation via the mechanisms in the searcher to poison cancelled queries. But once the aggregation finishes collection, there is no further need to interact with the searcher, so we cannot rely on that for cancellation checking. In particular, deeply nested aggregations can spend a long time constructing the results tree.

Checking for cancellation is a trade off, as the check itself is somewhat expensive (it involves a volatile read), so we want to balance checking often enough that cancelled queries aren't taking up resources for a long time, but not so frequently that it slows down most aggregation queries. Our first attempt to this is to check once when we go to build sub-aggregations, as the worst cases for this that we've seen involve needing to build deep sub-aggregation trees. Checking at sub-aggregation construction time also provides a conveniently centralized method call to add the check to.

---------



 Conflicts:
	server/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java
	test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-02-07 06:51:21 +11:00
Andrei Stefan
bb77d4979e
ESQL: use field_caps native nested fields filtering (#121918)
* [8.x] ESQL: use field_caps native nested fields filtering (#117201) (#117375) (#121645)

* Just filter the nested fields natively with field_caps support

(cherry picked from commit 73381dbeb1)

* Add import
2025-02-06 19:39:53 +02:00
Oleksandr Kolomiiets
28635f09d8
[8.16] Fix synthetic source issue with deeply nested ignored source fields (#121715) (#121790)
* Fix synthetic source issue with deeply nested ignored source fields (#121715)

* Fix synthetic source issue with deeply nested ignored source fields

* Update docs/changelog/121715.yaml

* fix tests
2025-02-06 07:13:24 +11:00
Joe Gallo
24c39085ca
Update geolocation database documentation (#121472) (#121671) 2025-02-05 02:22:49 +11:00
Simon Cooper
9fa215a68f
[8.16] Update transport and index version id numbers to S_PP (#121380) (#121523)
Backport #121380 to 8.16
2025-02-03 13:56:48 +00:00
David Turner
12a39baef2
Cheaper snapshot-related toString() impls (#121283) (#121308)
If the `MasterService` needs to log a create-snapshot task description
then it will call `CreateSnapshotTask#toString`, which today calls
`RepositoryData#toString` which is not overridden so ends up calling
`RepositoryData#hashCode`. This can be extraordinarily expensive in a
large repository. Worse, if there's masses of create-snapshot tasks to
execute then it'll do this repeatedly, because each one only ends up
yielding a short hex string so we don't reach the description length
limit very easily.

With this commit we provide a more efficient implementation of
`CreateSnapshotTask#toString` and also override
`RepositoryData#toString` to protect against some other caller running
into the same issue.
2025-01-31 04:09:56 +11:00
Liam Thompson
13441bc9b1
Update recovery.asciidoc (#114889) (#121218)
(cherry picked from commit d8874b6524)

Co-authored-by: Paulo <paulletilly@gmail.com>
2025-01-30 04:45:20 +11:00
Liam Thompson
7e736e0def
[DOCS] Update getting-started.asciidoc (#116151) (#121172)
Update `new_field` to `language` which is the actual new field added in dynamic mapping

Co-authored-by: Ekwinder <ekwindersaini@gmail.com>
2025-01-30 00:51:21 +11:00
Valeriy Khakhutskyy
1538e0d29e
Extend documentation note. (#121146) (#121160) 2025-01-29 23:30:26 +11:00
István Zoltán Szabó
a201f549d2
[8.16] [DOCS] Documents that deployment_id can be used as inference_id in certain cases. (#121055) (#121072)
* [DOCS] Resolves conflict.

* Apply suggestions from code review
2025-01-28 21:56:22 +01:00
István Zoltán Szabó
cfddc26697
[DOCS] Resolves conflict. (#121069) 2025-01-28 21:07:05 +01:00
George Wallace
e7be978b3a
Adjusted alias doc for clarity (#120437) (#121063)
Co-authored-by: Kofi B <kofi.bartlett@elastic.co>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-01-29 03:51:38 +11:00
Panagiotis Bailis
c5a57fc690
[8.16] backporting fix for negative scores in text_similarity_ranker retriever (#121056) 2025-01-28 18:30:16 +02:00
Carlos Delgado
97c4bdca28
Fix incorrect use of "updateable" flag in synonyms documentation (#120866) (#121044)
Co-authored-by: Amine GANI <gani.amine@gmail.com>
Co-authored-by: Amine GANI <amine.gani@adelean.com>
2025-01-29 02:07:26 +11:00
Charlotte Hoblik
5d00b7e8cc
Fix typo in tutorial (#120928) (#121040) 2025-01-29 01:36:28 +11:00
Liam Thompson
80039d6d25
Update match-phrase-query.asciidoc (#118828) (#121035)
(cherry picked from commit 8e9cccba6a)

Co-authored-by: Damien RENIER <153135842+damien-renier-elastic@users.noreply.github.com>
2025-01-29 01:10:09 +11:00
Liam Thompson
abad04d97a
Update README.asciidoc (#96455) (#121027)
Co-authored-by: ARPIT SHARMA <93235104+ARPIT2128@users.noreply.github.com>
2025-01-28 15:01:01 +01:00
Pius Fung
e1c635b336
Add warning on scripted metric aggregation's intermediate state memory usage (#119379) (#121003) 2025-01-28 21:39:26 +11:00
Sean Story
46361e4d70
Clarify need to submit for authorization (#119460) (#121002) 2025-01-28 21:34:12 +11:00
Maxim Kholod
7fbe99db8a
Update index-templates.asciidoc (#113461) (#120893)
Adding `security_solution-*-*` in list of index nae to avoid the pattern collisions.

(cherry picked from commit 0638d3977a)

Co-authored-by: Smriti <152067238+smriti0321@users.noreply.github.com>
2025-01-27 12:30:07 +01:00
Aurélien FOUCRET
12ea3b2f64
[8.16] LTR - Fix explain failure when index has multiple shards (#120717) (#120794)
* LTR - Fix explain failure when index has multiple shards  (#120717)

* Fix test failing in 8.x branch.
2025-01-24 23:21:43 +01:00
Aurélien FOUCRET
149fbf215f
LTR sometines throw NullPointerException: Cannot read field "approximation" because "top" is null (#120809) (#120827)
* Add check on the DisiPriorityQueue size.

* Update docs/changelog/120809.yaml

* Add a unit test.
2025-01-25 06:15:42 +11:00
Niels Bauman
8adafb01d7
[8.16] Improve memory aspects of enrich cache (#120256) (#120762)
* Improve memory aspects of enrich cache (#120256)

This commit reduces the occupied heap space of the enrich cache and
corrects inaccuracies in tracking the occupied heap space (for cache
size limitation purposes).

---------

Co-authored-by: Joe Gallo <joegallo@gmail.com>

* Fix compilation

---------

Co-authored-by: Joe Gallo <joegallo@gmail.com>
2025-01-24 16:18:14 +11:00
Liam Thompson
8f58b770c3
Removes outdated admonition (#120556) (#120705)
Resolves /security-docs/https://github.com/elastic/security-docs/issues/6430. Removes an outdated admonition.

(cherry picked from commit 63074d8e70)

Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com>
2025-01-23 23:42:35 +11:00
Marci W
ce90795b2d
[DOCS] Count API: clarify ways to specify search query (#120564) (#120681)
* Clarify query methods; other sprucing

* Apply suggestions from review
2025-01-23 10:31:10 +11:00
Andrei Stefan
faeeb31822
Update search-across-clusters.asciidoc to reflect the true default value of skip_unavailable setting. (#120592) (#120634) 2025-01-23 01:36:51 +11:00
Felix Barnsteiner
ae7ae7b9e4
Map scope.name as a dimension (#120590) (#120615) 2025-01-23 00:00:12 +11:00
elasticsearchmachine
24ff286e59 Finalize release notes for v8.16.3 2025-01-22 22:30:08 +11:00
elasticsearchmachine
943c61e335 Prune changelogs after 8.16.3 release 2025-01-21 16:32:28 +00:00
István Zoltán Szabó
2f1c2f82d4
[8.16] [DOCS] Rename inference services to inference integrations in docs (#120517)
Co-authored-by: David Kyle <david.kyle@elastic.co>
2025-01-21 12:31:31 +01:00
Liam Thompson
ee18ffe583
[DOCS] Updated wording for clarity for new users (#120257) (#120506)
Co-authored-by: Kofi B <kofi.bartlett@elastic.co>
2025-01-21 20:30:37 +11:00
Liam Thompson
9e6ce3c564
[DOCS] Update wildcard query documentation (#120251) (#120501)
Co-authored-by: Kofi B <kofi.bartlett@elastic.co>
2025-01-21 20:27:07 +11:00
Yang Wang
2ec306623e
Clarify docs around disk capacity expectation. (#115745) (#120491)
Make it explicit that es expects disks to have the same capacity across all the nodes in the same data tier.

(cherry picked from commit 3ebc1f48aa)

Co-authored-by: Ievgen Degtiarenko <ievgen.degtiarenko@elastic.co>
2025-01-21 16:38:20 +11:00
Charlotte Hoblik
9c14fb7037
Fix aggregation typo (#120461) (#120468) 2025-01-21 01:10:34 +11:00
Jongho Han
bf2e91d4a5
Update security-basic-setup.asciidoc (#117009)
Fix Starting -> Stopping
2025-01-20 10:06:39 +01:00
Pat Whelan
db506c30c4
[ML] Update docs to say PUT instead of POST (#120215) (#120229) 2025-01-16 06:19:18 +11:00
Liam Thompson
df303d2b90
[DOCS] More targeted link for ESQL in CCS overview (#120125) (#120183) 2025-01-15 20:58:14 +11:00
Ignacio Vera
0710a9dcd9
Fix potential file leak in ES816BinaryQuantizedVectorsWriter (#120014) (#120091)
We are creating tmp files that might not get closed if an exception happens just after it. This commit makes sure all
errors are handle properly and files are getting closed and deleted.
# Conflicts:
#	muted-tests.yml
2025-01-14 20:00:42 +11:00
Mike Pellegrini
7141ff1866
[8.16] Update Text Similarity Reranker to Properly Handle Aliases (#120062) (#120077)
* Update Text Similarity Reranker to Properly Handle Aliases (#120062)

(cherry picked from commit 264d1c29d4)

# Conflicts:
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferenceFeatures.java

* Fix compilation error
2025-01-14 07:03:09 +11:00
elasticsearchmachine
c6141dd49f
Update docs for v8.16.3 release (#120011) 2025-01-13 11:00:15 +01:00
Carlos Delgado
4705bde926
ESQL - Update QSTR docs (#120026) (#120028) 2025-01-13 20:09:13 +11:00
Zach Brisson
43b7524a04
Include enrich.cache_size breaking change in 8.16 doc (#118161)
This commit adds an "Ingest changes" to the breaking changes section to outline this new behavior.
2025-01-13 01:15:21 +00:00
Liam Thompson
304d45d85c
[DOCS] Improve/fix documentation on stored scripts (#119921) (#119972)
* Improve/fix documentation on stored scripts

* Update docs/reference/scripting/using.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

* Update docs/reference/scripting/using.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

* Update docs/reference/transform/painless-examples.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

---------

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

Co-authored-by: Valentin Crettaz <valentin.crettaz@consulthys.com>
2025-01-11 04:17:50 +11:00
Liam Thompson
213f7a6604
Update Sharepoint Online connector documentation (#119933) (#119958)
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
(cherry picked from commit f2d069e2bf)

Co-authored-by: Artem Shelkovnikov <lavatroublebubble@gmail.com>
2025-01-11 02:31:33 +11:00
Pooya Salehi
eb6c6fdb60
Issue S3 web identity token refresh call with sufficient permissions (#119748) (#119929)
Closes #119747
2025-01-10 21:48:10 +11:00
Michael Peterson
87211f249c
Resolve/cluster should mark remotes as not connected when a security exception is thrown (#119793) (#119866)
Fixes two bugs in _resolve/cluster.

First, the code that detects older clusters versions and does a fallback to the _resolve/index
endpoint was using an outdated string match for error detection. That has been adjusted.

Second, upon security exceptions, the _resolve/cluster endpoint was marking the clusters as connected: true,
under the assumption that all security exceptions related to cross cluster calls and remote index access were
coming from the remote cluster, but that is not always the case. Some cross-cluster security violations can
be detected on the local querying cluster after issuing the remoteClient.execute call but before the transport
layer actually sends the request remotely. So we now mark the connected status as false for all ElasticsearchSecurityException cases. End user docs have been updated with this information.
2025-01-10 01:57:36 +11:00
Felix Barnsteiner
7324f31e01
Add missing traces ilm policy for OTel traces data streams (#119449) (#119825) 2025-01-09 18:55:23 +11:00
Jonathan Buttner
e7ba9f45d0
[ML] Fix loss of context in the inference API for streaming APIs (#118999) (#119223)
* Adding context preserving fix

* Update docs/changelog/118999.yaml

* Update docs/changelog/118999.yaml

* Using a setonce and adding a test

* Updating the changelog

(cherry picked from commit 7ba3cb9d0d)

# Conflicts:
#	x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/InferenceBaseRestTest.java
#	x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/InferenceCrudIT.java
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferencePlugin.java
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/rest/RestUnifiedCompletionInferenceAction.java
#	x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/rest/RestUnifiedCompletionInferenceActionTests.java
2025-01-07 14:25:49 -05:00
Rene Groeschke
5db05ea87c
[Gradle] Fix :docs:yamlRest test cc compatibility (#119680) (#119686)
- reference a Gradle script object from a Groovy closure during execution phase is not allowed
2025-01-08 04:33:41 +11:00
Jan Kuipers
1dddbd7e4b
Fix spike detection for short spikes at the tail of the data. (#119637) (#119668)
* Fix spike detection for short spikes at the tail of the data.

* Update docs/changelog/119637.yaml
2025-01-08 03:39:01 +11:00