Commit graph

21514 commits

Author SHA1 Message Date
Alexander Spies
1ad6dbc599
ESQL: More specific index pattern in testMultipleBatchesWithLookupJoin (#130006)
* Specific idx in testMultipleBatchesWithLookupJoin

Do not use `from *` in the test, be more specifc - otherwise other tests
can affect the output if they leave indices behind, affecting the column
count.

* Remove column count validation

That doesn't really tell us much in this test, anyway.
2025-06-26 15:06:16 +02:00
Niels Bauman
1e9db8b248
Make ILM operation mode APIs project-aware (#129678)
Also updates the lifecycle service.
2025-06-26 22:44:38 +10:00
Albert Zaharovits
f5963959c7
Decrease merge task checker periodicity in tests (#130082)
Decreases the periodicity (from 5s to 100ms), for some tests, with which merge tasks are checked if there's sufficient available disk space to execute or if they've been aborted since enqueued for execution.

Fixes #130044
2025-06-26 15:30:32 +03:00
Nik Everett
59133d5e00
ESQL: Prepare for backport of documents_found (#130039)
Prepares the `main` branch for the backport of #125631. Specifically,
this adds the version constant for 8.19 to main and the serialization
code that lets main talk to 8.19.
2025-06-26 07:51:17 -04:00
Valeriy Khakhutskyy
4c7d922eeb
[ML] Fix timeout bug in DBQ deletion of unused and orphan ML data (#130083)
There was a bug in the code for deleting unused and orphan ML data. When deletion using DBQ occurred, the bug caused the request to time out. This PR resolves the issue.
2025-06-26 13:24:59 +02:00
Luigi Dell'Aquila
9e06a22398
ES|QL: Unmute generative tests (#130081)
Add circuit breaker exceptions to known errors in generative tests
2025-06-26 20:44:30 +10:00
Quentin Pradet
21180dfd8d
Add inference YAML tests to rest-resources-zip (#130070) 2025-06-26 13:55:20 +04:00
Rene Groeschke
e1426b7df6
[Test] Extend timeout for CoreWithMultipleProjectsClientYamlTestSuiteIT timing out in release tests (#130074) 2025-06-26 19:55:05 +10:00
Parker Timmins
9aaba25d58
Simple version of patterned_text with a single doc value for arguments (#129292)
Initial version of patterned_text mapper. Behaves similarly to match_only_text. This version uses a single SortedSetDocValues for a template and another for arguments. It splits the message by delimiters, the classifies a token as an argument if it contains a digit. All arguments are concatenated and inserted as a single doc value. A single inverted index is used, without positions. Phrase queries are still possible, using the SourceConfirmedTextQuery, but are not fast.
2025-06-25 21:31:32 -05:00
Gal Lalouche
6970bd24a0
ESQL: Aggressive release of shard contexts (#129454)
Keep better track of shard contexts using RefCounted, so they can be released more aggressively during operator processing. For example, during TopN, we can potentially release some contexts if they don't pass the limit filter.

This is done in preparation of TopN fetch optimization, which will delay the fetching of additional columns to the data node coordinator, instead of doing it in each individual worker, thereby reducing IO. Since the node coordinator would need to maintain the shard contexts for a potentially longer duration, it is important we try to release what we can eariler.

An even more advanced optimization is to delay fetching to the main cluster coordinator, but that would be more involved, since we need to first figure out how to transport the shard contexts between nodes.

Summary of main changes:

DocVector now maintains a RefCounted instance per shard.
Things which can build or release DocVectors (e.g., LuceneSourceOperator, TopNOperator), can also hold RefCounted instances, so they can pass them to DocVector and also ensure contexts aren't released if they can still be potentially used later.
Driver's main loop iteration (runSingleLoopIteration), now closes its operators even between different operator processing. This is extra aggressive, and was mostly done to improve testability.
Added a couple of tests to TopNOperator and a new integration test EsqlTopNShardManagementIT, which uses the pausable plugin framework to check that TopNOperator releases things as early as possible..
2025-06-26 09:49:40 +10:00
Mark Vieira
e6cf2234fc
Allow ESQL extra verifiers to access settings (#129954) 2025-06-26 09:43:56 +10:00
David Kyle
5be4100afa
[ML] Apply patch logic for Cohere V2 transport changes (#129993) 2025-06-26 05:16:30 +10:00
Nhat Nguyen
2bc62848e8
Avoid dropping aggregate groupings in local plans (#129370)
The local plan optimizer should not change the layout, as it has already 
been agreed upon. However, CombineProjections can violate this when some
grouping elements refer to the same attribute. This occurs when
ReplaceFieldWithConstantOrNull replaces missing fields with the same
reference for a given data type.

Closes #128054
Closes #129811
2025-06-25 11:48:15 -07:00
Pawan Kartik
c94c021d0e
ES|QL: Check if cluster aliases and index patterns are valid before executing query (#122497)
ES|QL index patterns validation: Ensure that the patterns in the query are syntactically and semantically valid

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Co-authored-by: Andrei Stefan <astefan@users.noreply.github.com>
Co-authored-by: Alexander Spies <alexander.spies@elastic.co>
2025-06-25 16:47:42 +01:00
Niels Bauman
bc515c4070
Make IndexLifecycleService project-aware (#129932)
Updates the background service of ILM to process all projects in the
cluster.
2025-06-25 10:38:15 -03:00
Martijn van Groningen
bd5f43f3ee
Build the correct keyword field type for PotentiallyUnmappedKeywordEsField (#129854)
Before a `KeywordFieldType` was created that didn't set the isSyntheticSource field, causing to use the wrong block loader that would synthesize the complete _source instead of just loading values from ignored source. This PR addresses this.
2025-06-25 15:29:26 +02:00
David Turner
138f350840
Upgrade tests to MinIO RELEASE.2025-06-13T11-33-47Z (#129920)
New MinIO release just dropped, migrating the tests to use it and
dropping the workaround for known issues in older versions.
2025-06-25 19:22:41 +10:00
Ievgen Degtiarenko
56d5009924
Add query plans to profile output (#128828) 2025-06-25 10:50:04 +02:00
Tim Vernum
8b62a55f2f
Watch SSL files instead of directories (#129738)
With the introduction of entitlements (#120243) and exclusive file
access (#123087) it is no longer safe to watch a whole directory.

In a lot of deployments, the parent directory for SSL config files
will be the main config directory, which also contains exclusive files
such as SAML realm metadata or File realm users. Watching that
directory will cause entitlement warnings because it is not
permissible for core/ssl-config to read files that are exclusively
owned by the security module (or other modules)
2025-06-25 18:24:57 +10:00
Bogdan Pintea
e245c176a2
ESQL: Add one more test of FTF with LOOKUP JOIN (#129781)
Add one more test of FTF with LOOKUP JOIN
2025-06-25 10:22:06 +02:00
Niels Bauman
73d2e30c39
Clean up x-pack multi-project YAML test mutes (#129965) 2025-06-25 11:04:16 +10:00
Yang Wang
e1c930f8c1
Make RepositoriesService project-aware (#129821)
This PR makes RepositoriesService project aware so that the basic Put,
Get, Delete and Verify repository actions are now project scoped. 

It intentionally leaves the following aspects out of scope for the
current changes: * Repository stats reporting * Repository clean-up,
analysis and integrity verification * Repository usages for searchable
snapshots and CCR

They will be worked on separately. One main reason for leaving them out
is that they are not needed by OBS which is currently blocked by
repository/snapshot changes. They may also have their own complexities,
e.g. stats reporting.

Resolves: ES-10478
2025-06-25 10:34:34 +10:00
Mike Pellegrini
651bc39565
Simplified Linear & RRF Retrievers - Return error on empty fields param (#129962) 2025-06-24 19:25:24 -04:00
David Kyle
3a1551e0ef
[ML] Move to the Cohere V2 API for new inference endpoints (#129884) 2025-06-25 07:51:05 +10:00
Brendan Cully
73b0a60a77
Revert "Dispatch ingest work to coordination thread pool (#129820)" (#129949)
This reverts commit 53dae7a3a2.
2025-06-24 14:38:50 -07:00
HYUNSANG HAN (한현상, Travis)
d16271b78d
Add RemoveBlock API to allow DELETE /{index}/_block/{block} (#129128)
Introduces a new `RemoveBlock` API that complements the existing `AddBlock` API by allowing users to remove index blocks using `DELETE /{index}/_block/{block}`.

Resolves #128966

---------

Co-authored-by: Niels Bauman <nielsbauman@gmail.com>
2025-06-25 06:16:14 +10:00
Tim Grein
3b51dd568c
[EIS] Dense Text Embedding task type integration (#129847) 2025-06-24 21:38:16 +02:00
Tim Grein
870d581084
[EIS] Implement chunked & batched inference for sparse text embeddings (#129922) 2025-06-24 17:22:29 +02:00
Andrei Stefan
9c52106c61
ESQL: Move explain command validation off EsqlSession (#129918) 2025-06-24 18:05:29 +03:00
David Kyle
aaee222dfa
[ML] Add hint about using input_output in the inference processor to error message (#129864) 2025-06-24 21:45:18 +10:00
Slobodan Adamović
ee6d64afdf
[Test] Fix FileSettingsRoleMappingsRestartIT (#129618)
The #127318 changed the behaviour of `client()` to not start a node if there 
is none found in the cluster. Which also changed the `getMasterName()` 
behaviour to simply fail if there are no nodes instead of starting one.

This is why the `getMasterName()` is failing now. There were no nodes 
started because the test scope is set to manually manage master nodes 
(`autoManageMasterNodes = false`) without data nodes (`numDataNodes = 0`).

The fix is to actually start the master node instead of attempting to get 
the master node name from an empty cluster and depend on a side effect 
to actually boostrap a node.

Additionally it awaits for the master node to process all cluster state events 
before proceeding, which should hopefully solve the original cause of failures.

Resolves #120964
Resolves #120923
2025-06-24 12:37:47 +02:00
Ievgen Degtiarenko
da6029fdce
Fix StatementParserTests (#129898)
This change fixes StatementParserTests.testPreserveParanthesis as it now depends on capability enabled only on snapshot builds
2025-06-24 11:28:19 +02:00
Larisa Motova
c94bd1cf24
[ES|QL] Change rounding mode in tests to HALF_DOWN (#129895)
The current rounding mode in some of the tests in ESQL uses DOWN which
truncates more than rounds and can result in some tests failing with
errors like `row 0 column 0:0: expected <0.05235999> but was <0.05236>`
HALF_DOWN would round this up
2025-06-23 21:22:36 -10:00
Nhat Nguyen
d3049e03e1
Fix translation for two time-series aggregations (#129892)
This PR fixes the time-series translation for cases where two 
time-series aggregation functions are used within an outer aggregation
function, for example: STATS max(rate(r1) + rate(r2)).
2025-06-24 16:55:59 +10:00
Nik Everett
59a10bdd7b
ESQL: Add counters to signature for IS NULL (#129670)
This adds `counter_long` and `counter_double` to the signatures of
supported fields for `IS NULL` and `IS NOT NULL`. We hadn't been
generating those signatures since the docs v3 migration, so this had to
plug those in. In addition, it changes the wording on a few things and
adds a note that if a field is only in some documents then the ones
missing the field will have `NULL` - which is important information for
`IS NULL` and `IS NOT NULL`.
2025-06-24 01:18:15 +01:00
Brian Rothermich
0f39ff586c
Bring over merge metrics from stateless (#128617)
Relates to an effort to combine the merge schedulers from stateless and stateful. The stateless merge scheduler has MergeMetrics that we want in both stateless and stateful. This PR copies over the merge metrics from the stateless merge scheduler into the combined merge scheduler.

Relates ES-9687
2025-06-23 19:42:01 -04:00
Mark J. Hoy
a671505c8a
Update sparse_vector field mapping to include default setting for token pruning (#129089)
* Initial checkin of refactored index_options code

* [CI] Auto commit changes from spotless

* initial unit testing

* complete unit tests; add yaml tests

* [CI] Auto commit changes from spotless

* register test feature for sparse vector

* Update docs/changelog/129089.yaml

* update changelog

* add docs

* explicit set default index_options if null

* [CI] Auto commit changes from spotless

* update yaml tests; update docs

* fix yaml tests

* readd auth for teardown

* only serialize index options if not default

* [CI] Auto commit changes from spotless

* serialization refactor; pass index version around

* [CI] Auto commit changes from spotless

* fix transport versions merge

* fix up docs

* [CI] Auto commit changes from spotless

* fix docs; add include_defaults unit and yaml test

* [CI] Auto commit changes from spotless

* override getIndexReaderManager for SemanticQueryBuilderTests

* [CI] Auto commit changes from spotless

* cleanup mapper/builder/tests; index vers. in type

still need to refactor / clean YAML tests

* [CI] Auto commit changes from spotless

* cleanups to mapper tests for clarity

* [CI] Auto commit changes from spotless

* move feature into mappers; fix yaml tests

* cleanups; add comments; remove redundant test

* [CI] Auto commit changes from spotless

* escape more periods in the YAML tests

* cleanup mapper and type tests

* [CI] Auto commit changes from spotless

* rename mapping for previous index test

* set explicit number of shards for yaml test

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Co-authored-by: Kathleen DeRusso <kathleen.derusso@elastic.co>
2025-06-24 08:21:32 +10:00
Pat Whelan
98e705dd2e
[Transform] Change reindex links (#129879)
Link directly to the Transform reindex migration guide.
2025-06-24 07:53:48 +10:00
Pat Whelan
aeb37189af
[ML] SageMaker Elastic Payload (#129413)
Send the Elastic API Payload to a SageMaker endpoint, and parse the
response as if it were an Elastic API response.

- SageMaker now supports all task types in the Elastic API format.
- Streaming is supported using the SageMaker client/server rpc,
  rather than SSE. Payloads must be in a complete and valid JSON
  structure.
- Task Settings can be used for additional passthrough settings, but
  they will not be saved alongside the model. Elastic cannot make
  guarantees on the structure or contents of this payload, so Elastic
  will treat it like the other input payloads and only allow them during
  inference.
2025-06-24 06:43:24 +10:00
Liam Thompson
8c06acccf8
[DOCS][ESQL] GA search functions for 9.1 (#129786)
* [DOCS][ESQL] Flip preview booleans, to GA search functions

* render docs, tweak some applies_to metadata in docs gen code

- **rendered docs (md):**
  - kql: removed serverless preview, added ga 9.1.0
  - match: removed serverless preview, added ga 9.1.0
  - match_phrase: changed from preview 9.1.0 to unavailable 9.0 + ga 9.1.0
  - qstr: removed serverless preview, added ga 9.1.0
  - search functions list: removed bullet point before term function

- **docs generation code (java):**
  - match_phrase: updated function info annotations to unavailable 9.0 + ga 9.1.0
  - query_string: uncommented ga 9.1.0 annotation
2025-06-23 20:51:54 +01:00
Ankit Sethi
22390d7817
Move docker image to registry to address flaky test (#129660)
* Instead of creating a new Docker image on-the-fly, it is better to create a persistent image and upload it to Docker Registry. This will help tests dependent on this image be resilient to transient issues such as #126694 and also speed up execution.

* fix name
2025-06-23 14:38:38 -05:00
Julian Kiryakov
caae426cf7
Pushdown for LIKE (LIST) (#129557)
Improved performance of LIKE (LIST)  by pushing an Automaton to do the evaluation down to Lucine.
2025-06-23 14:35:09 -04:00
Craig Taverner
e6347b8ab0
[DOCS] Update ES|QL generated docs to consistently use the applies_to metadata (#128576)
- Add PREVIEW annotations to all preview functions
- Update docs generation logic to use annotations instead of preview boolean
* Changed stack: ga 9.1 to stack: coming in multiple places
  - Match.java: Updated the options parameter description
  - MultiMatch.java: Updated the options parameter description
  - ToLower.java: Reformatted parameter description and updated version annotation
  - ToUpper.java: Removed the appliesTo annotation entirely and reformatted parameter description

- updated applies_to annotations to specify both preview 9.0.0 and ga 9.1.0 lifecycle stages
- added version-specific documentation examples with applies_to markers for ga 9.1.0 features
- enhanced to_lower and to_upper functions to indicate support for multi-valued expressions in ga 9.1.0
- added version guards around function parameters and descriptions using applies_to syntax
- updated function parameter descriptions to indicate ga 9.1.0 availability for named parameters
- use detailedDescription + and fix match_phrase applies_to syntax
- strip inline applies_to from kibana docs
- update roundto, matchphrase lifecycles
-  fix match named params info
- various spatial functions are preview
- unsigned long is preview
- update qstr
- Update TO_LOWER/TO_UPPER parameter descriptions for clarity
- hide spatial functions per https://github.com/elastic/elasticsearch/pull/129839
- added `stack: ga 9.1.0` blocks to match_phrase.md and qstr.md examples
- simplified term.md version from `preview 9.0.0` to just `preview`
- added `applies_to = "stack: ga 9.1.0"` to matchphrase and querystring java annotations
- removed version `9.0.0` from term function annotation
- deleted unused `makeCallout()` and `appendLifeCycleAndVersion()` methods


Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Co-authored-by: Liam Thompson <leemthompo@gmail.com>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Nik Everett <nik9000@gmail.com>
2025-06-23 20:07:41 +02:00
Lola
ded666ec66
[Cloud Security Posture] fix ilm deletion step error permissions (#128634)
* fix ilm deletion step policy

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-06-24 02:56:13 +10:00
David Kyle
816caf70fc
[ML] Check for model deployment in inference endpoints before stopping (#129325) 2025-06-23 16:39:51 +01:00
Mike Pellegrini
636da86ccb
Simplified RRF Retriever (#129659) 2025-06-23 11:35:28 -04:00
Tim Brooks
53dae7a3a2
Dispatch ingest work to coordination thread pool (#129820)
The vast majority of ingest pipelines are light CPU
operations. We don't want these to be put behind IO work on the write
executor. Instead, execute these on the coordination pool.
2025-06-23 09:31:36 -06:00
Alexander Spies
efb1397fe9
ESQL: Hide spatial grid functions behind SNAPSHOT (#129839)
#125143 added 9 spatial grid functions and released them into Serverless. We think this is not the best long-term approach and the functions in #129581 are likely better.

As a first step, rmove the spatial grid functions added in #125143 from release builds so they don't get released into 8.19/9.1.

---------

Co-authored-by: Craig Taverner <craig@amanzi.com>
2025-06-23 17:16:30 +02:00
Jonathan Buttner
c7a5c5923c
[ML] Removing Custom Service Feature Flag (#129780)
* Removing feature flag

* Removing missed references
2025-06-23 10:44:59 -04:00
Brendan Jugan
cef717c087
add default inference endpoint for Elastic Inference Service rerank (#129681)
* add Elastic Inference Service rerank default inference endpoint

* [CI] Auto commit changes from spotless

* fix integ tests

* update mock Elastic Inference Service authorization response

* fix rerank service test

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-06-23 09:48:50 -04:00