Commit graph

8984 commits

Author SHA1 Message Date
Tim Brooks
ea2e7b4382
Reapply "Dispatch ingest work to coordination thread pool (#130152)
This reverts commit 73b0a60.

Additionally, it adds thread pool documentation.
2025-06-27 11:34:28 -06:00
Keith Massey
21bb836ce5
Adding actions to get and update data stream mappings (#130042) 2025-06-27 10:29:06 -05:00
Sam Xiao
6cb7b2d2f2
Make TransportPutDatabaseConfigurationAction project aware (#130063) 2025-06-27 16:15:49 +08:00
Joe Gallo
5931f08129
Tidy up project metadata fetching (#130130) 2025-06-26 19:00:22 -04:00
Jordan Powers
40a7d02269
Pull match_only_text fixes into main (#130049)
This brings in the fixes from #130020, with minor fixes to address review
nits from that PR.

Co-authored-by: Martijn van Groningen <martijn.v.groningen@gmail.com>
2025-06-27 04:31:33 +10:00
Martijn van Groningen
c0b2bb1f75
Stop configuring index.number_of_replicas in mapper-extras yaml tests. (#130099) 2025-06-26 17:59:03 +02: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
Keith Massey
528bd9c234
Adding mappings to data streams (#129787) 2025-06-25 15:03:28 -05:00
Sam Xiao
285b09ef8d
Remove geoip multi-project tests from release build (#129976) 2025-06-26 00:01:39 +08:00
Sam Xiao
41a47c24b7
Make GeoIP database node loader project-aware (#129829)
- loads the downloaded GeoIP databases from system index to ingest node file system for each project
- each project's databases are loaded to directory `tmp/geoip-databases/{nodeId}/{projectId}`
2025-06-25 12:46:47 +08: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
Keith Massey
0b58a53a98
Adding the ability to unset data stream settings (#129677) 2025-06-24 10:30:15 -05:00
David Turner
8573865341
Remove dead @TestIssueLogging anns from repo-s3 (#129906)
These logging directives relate to test failures that have long-since
been closed so can be removed.

Relates #101608
Relates #88841
2025-06-24 14:04:16 +01: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
Niels Bauman
bae6e3c66d
Fix data stream stats YAML test (#129813)
Occasional shard allocation issues were causing the YAML tests to fail
because the shard that had the document with the max timestamp in it
would be unavailable.

Fixes #118217
2025-06-24 01:22:48 +10:00
Sam Xiao
e3838a4b9c
Make GeoIp downloader multi-project aware (#128282)
This change makes the GeoIp persistent task executor/downloader multi-project aware. 
- the database downloader persistent task will be at the project level, meaning there will be a downloader instance per project
- persistent task id is prefixed with project id, namely `<project-id>/geoip-downloader` for cluster in MP mode
2025-06-23 15:07:40 +08:00
Luke Whiting
a952245178
Fix missing feature flag on Streams YAML tests (#129747)
* Fix missing feature flag on YAML tests

* Unmute tests
2025-06-20 21:12:51 +10:00
Mikhail Berezovskiy
eeca493860
Move HTTP content aggregation from Netty into RestController (#129302) 2025-06-19 09:05:17 -07:00
Luke Whiting
1ccf1c6806
Streams - Log's Enable, Disable and Status endpoints (#129474)
* Enable And Disable Endpoint

* Status Endpoint

* Integration Tests

* REST Spec

* REST Spec tests

* Some documentation

* Update docs/changelog/129474.yaml

* Fix failing security test

* PR Fixes

* PR Fixes - Add missing feature flag name to YAML spec

* PR Fixes - Fix support for timeout and master_timeout parameters

* PR Fixes - Make the REST handler validation happy with the new params

* Delete docs/changelog/129474.yaml

* PR Fixes - Switch to local metadata action type and improve request handling

* PR Fixes - Make enable / disable endpoint cancellable

* PR Fixes - Switch timeout param name for status endpoint

* PR Fixes - Switch timeout param name for status endpoint in spec

* PR Fixes - Enforce local only use for status action

* PR Fixes - Refactor StreamsMetadata into server

* PR Fixes - Add streams module to multi project YAML test suite

* PR Fixes - Add streams cluster module to multi project YAML test suite
2025-06-19 11:48:44 +01:00
Pete Gillin
8555c16290
Fix testPurgeCacheEntriesForDatabase on Windows (#129648)
Our hypothesis is that the path is not round-tripping on Windows. This
fixes the test by always using the canonical string for the path, when
inserting and when purging.

Fixes #129635
2025-06-19 09:06:09 +01:00
Yang Wang
91ee26f690
[Test] Use default project s3 repo tests (#129683)
The stateful side tests generally do not exercise multi-project.
Therefore we need to use the default project-id instead of random one.

Relates: #127631
2025-06-19 16:42:19 +10:00
Yang Wang
92b32b535b
Passing in project-id when creating s3 client (#129301)
Enables creating different s3 clients for different projects

Relates: #127631
2025-06-19 12:34:11 +10:00
Keith Massey
92e4244f8e
Putting the ingest otel processor behind the logs stream feature flag (#129667) 2025-06-18 17:40:12 -05:00
Pooya Salehi
a229c8d932
Integrate project global blocks into existing checks for cluster blocks (Part 2) (#129570)
Relates https://github.com/elastic/elasticsearch/pull/129467
Resolves ES-11209
2025-06-18 19:51:40 +10:00
Pete Gillin
c4249a8596
ES-11372: Add project ID to key for geoip cache (#129572)
In this change, the lazy loader passes in the default project ID. That
will be fixed in a later PR.

ES-11372 #comment Project ID added to cache key in https://github.com/elastic/elasticsearch/pull/129572
2025-06-18 09:19:04 +01:00
Keith Massey
90c24d06e7
Fixing for loop in DataStreamSettingsIT (#129564) 2025-06-18 05:30:16 +10:00
Jordan Powers
5d1999781a
Use optimized text in match_only_text fields (#129371)
Follow-up to #126492 to use the json parsing optimizations for
match_only_text fields.

Relates to #129072.
2025-06-17 08:15:40 -07:00
Niels Bauman
9f78d11639
Remove usages of DataStream#getDefaultBackingIndexName (#129466)
These usages had the potential of causing test failures when a data
stream was created before midnight and the backing index name generation
ran the next day - which would be millisecconds apart. To avoid these
failures, we update the tests to be robust to these time differences.

Resolves #123376
2025-06-17 11:02:52 -03:00
Niels Bauman
398da36f49
Make use of new projectClient method and remove old one (#129393)
We added a new `projectClient` method on `Client` in #129174. We now
update the usages of the old method (on `ProjectResolver`) to use the
new one and we delete the old method.
2025-06-17 13:39:04 +02:00
Pooya Salehi
d3d10c2efb
Integrate project global blocks into existing checks for cluster blocks (#129467)
This PR updates some of the existing checks for cluster blocks to also consider project global blocks. It adds a few project-aware flavour of existing methods in `ClusterBlocks`. `globalBlockedException(ClusterBlockLevel)` is the mostly used one. I've updated only some of the obvious ones here. 
Follow up to https://github.com/elastic/elasticsearch/pull/127978
Relates ES-11209
2025-06-17 12:36:59 +02:00
Martijn van Groningen
a0cc698fa2
Update multi field stored by default index version check (#129386)
Relates to #129126
2025-06-17 12:20:38 +02:00
Yang Wang
adf4d1005f
Setting for estimated shard heap allocation decider (#128722)
This PR adds a new setting to toggle the collection for shard heap
usages as well as wiring ShardHeapUsage into ClusterInfoSimulator.

Relates: #128723
2025-06-17 13:28:00 +10:00
Moritz Mack
9e5cac34a4
Expand bcUpgradeTask to run more test suites. (#128983)
Relates to ES-11904

#128984 contains the changes to the PR buildkite pipeline to test this change while the buildkite changes are not merged yet.
2025-06-13 12:58:49 +02:00
Niels Bauman
87c6fa7e9b
Introduce projectClient method on Client (#129174)
We originally defined the `projectClient` method on `ProjectResolver` as
a convenience method to execute API calls for specific projects. That
method requires a reference to both a `ProjectResolver` and a `Client`.

We now introduce the same method directly on the `Client` interface and
inject a `ProjectResolver` there, removing the need for a
`ProjectResolver` reference in places that just want to execute API
requests on a specific project.

To reduce the number of changes, this change solely focuses on
introducing the new method. Future changes will migrate the uses of the
original method to the new one and remove the original altogether.
2025-06-12 15:19:16 -03:00
Simon Cooper
3988ee1935
Check positions on MultiPhraseQueries as well as phrase queries (#129326) 2025-06-12 16:05:07 +01:00
Ignacio Vera
f02a3c423f
Revert "Use IndexOrDocValuesQuery in NumberFieldType#termQuery implementations (#128293)" (#129206)
This reverts commit de7c91c1d9.
2025-06-12 10:10:29 +02:00
Martijn van Groningen
33af83a0ca
Synthetic source: avoid storing multi fields of type text and match_only_text by default. (#129126)
Don't store text and match_only_text field by default when source mode is synthetic and a field is a multi field or when there is a suitable multi field.

Without this change, ES would store field otherwise twice in a multi-field configuration.

For example:

```
...
"os": {
  "properties": {
    "name": {
      "ignore_above": 1024,
      "type": "keyword",
      "fields": {
        "text": {
          "type": "match_only_text"
        }
      }
    }
...
```

In this case, two stored fields were added, one in case for the `name` field and one for `name.text` multi-field.
This change prevents this, and would never store a stored field when text or match_only_text field is a multi-field.
2025-06-10 16:32:47 +02:00
Luigi Dell'Aquila
aa87f46681
Optimize date rounding (#128687) 2025-06-10 10:56:56 +02:00
Tanguy Leroux
fa383afcc5
Small changes in concurrent multipart upload interfaces (#128977)
Small changes in BlobContainer interface and wrapper.

Relates ES-11815
2025-06-06 16:58:39 +02:00
Niels Bauman
3f037751b4
Remove non-test usages of Metadata.Builder#putCustom (#128801)
This removes all non-test usages of
```
Metadata.Builder.putCustom(String type, ProjectCustom custom)
```
And replaces it with appropriate calls to the equivalent method on
`ProjectMetadata.Builder`.

In most cases this _does not_ make the code project aware, but does
reduce the number of deprecated methods in use.
2025-06-06 09:00:24 +02:00
Iván Cea Fontenla
36828e2f72
Aggs: Fix significant terms not finding background documents for nested fields (#128472)
Closes https://github.com/elastic/elasticsearch/issues/101163

Fixes the `significant_terms` aggregation not working correctly on nested fields.
2025-06-04 15:54:35 +03:00
Tanguy Leroux
f190a69f5f
Add documentation to concurrent multipart upload utility methods (#128821)
In the hope to make more sense of how the flux of byte buffer works.
Also remove the synchronization on the input stream.

Relates ES-11815
2025-06-04 18:28:37 +10:00
eyalkoren
d3d2d9b996
Adding NormalizeForStreamProcessor (#125699) 2025-06-03 13:11:12 -04:00
Mary Gouseti
9764730d49
Remove include_default query param from get data stream options. (#128730)
Initially we added to the `include_defaults` to the get data stream
options REST API as it was used in the lifecycler API; however, we
decided to simplify it and not use it. We remove it now before it gets
adopted.
2025-06-03 18:15:42 +10:00
Ben Chaplin
13bce60be9
Fix inner hits + aggregations concurrency bug (#128036)
Fork InnerHitSubContext instances before source is fetched in 
aggregations to prevent inter-segment race conditions.

Relates to #122419
2025-06-02 16:44:53 -04:00
Tanguy Leroux
9b2252afb2
Fix computation of last block size in Azure concurrent multipart uploads (#128746)
Last part size is wrongly computed to 0 when the last part's length is
exactly equal to the size of a part. Would have probably be caught by an
existing assertion.

Relates ES-11815
2025-06-03 00:11:16 +10:00
Benjamin Trent
2a44166a2c
Applying Apache Lucene fix: https://github.com/apache/lucene/pull/14732 (#128671)
* Applying Apache Lucene fix: https://github.com/apache/lucene/pull/14732

* fixing test

* fixing annot
2025-06-02 09:50:25 -04:00
Iván Cea Fontenla
d597e50117
Use StringBuilder instead of StringBuffer (#128665) 2025-06-02 14:29:22 +03:00
Yang Wang
b2867481de
[CI] Fix testClientsLifeCycleForSingleProject (#128718)
More robust test for closed clients holder. Also changes
IllegalStateException to AlreadyClosedException for both closed manager
and holder.

Resolves: #128707
2025-06-02 09:53:57 +10:00
Yang Wang
6311bb3512
Support per-project s3 clients (#127631)
With project secrets in place, we can now create and manage per-project
repository clients in addition to the cluster level repository clients.
This PR adds a manager class for that. Note that the logic is not yet
fully wired because it needs per-project repository/objec_store which
will be added in separate PRs (as part of MP snapshots and MP
objecStoreService). As such the tests are currently unit tests.

Relates: https://github.com/elastic/elasticsearch/pull/126584 Resolves:
ES-11713
2025-05-30 22:53:58 +10:00