Commit graph

674 commits

Author SHA1 Message Date
Simon Cooper
a2d84b1b90
Remove assumed features in server for 9.0 (#119946)
All features added before 8.18 can now be assumed and removed in 9.0
2025-01-15 08:37:04 +00:00
Tim Vernum
ed3eb96930 Drop cluster scope method in DataStreamsActionUtil (MP-1910)
This removes the method

    getDataStreamNames(
        IndexNameExpressionResolver,
        ClusterState,
        String[],
        IndicesOptions
    )

from DataStreamsActionUtil and replaces all callers with the project
scoped version.

This necessitated the introduction of
`AcknowledgedTransportMasterNodeProjectAction` and some changes to
`TransportMasterNodeReadProjectAction` (and subclasses)
2025-01-14 05:36:00 +00:00
Niels Bauman
4605ecf44d
Remove trappy timeouts from GetMappingsRequest (#120035)
Relates #107984
2025-01-14 12:39:41 +10:00
Niels Bauman
83acbcb36b Merge main into multi-project 2025-01-10 15:08:22 +10:00
Niels Bauman
65e4ec129c
Run TransportGetComposableIndexTemplate on local node (#119830)
This action solely needs the cluster state, it can run on any node.
Additionally, it needs to be cancellable to avoid doing unnecessary work
after a client failure or timeout.

As a drive-by, this removes another usage of the trappy default master
node timeout.
2025-01-10 09:00:31 +10:00
Niels Bauman
48b9faeb92
Fix trappy timeouts in GetAliasesRequest (#119817)
Removes the use of the trappy default master node timeout and configures
a sensible default instead.
2025-01-10 08:59:42 +10:00
Simon Cooper
75d1050781
Mark all features added before 8.18 as assumed (#119055)
Features added before 8.18 can be removed, starting with 9.0. But first they need to be marked as assumed, so existing code knows they could be removed in later builds.
2025-01-09 16:59:25 +00:00
Tim Vernum
280fcb1a57 Merge main into multi-project 2025-01-09 19:39:24 +11:00
James Baiera
c3839e1f76
Add selector syntax to index expressions (#118614)
This PR introduces a new syntactical feature to index expression resolution: The selector.

Selectors, denoted with a :: followed by a recognized suffix will allow users to specify which component of 
an index abstraction they would like to operate on within an API call. In this case, an index abstraction is a 
concrete index, data stream, or alias; Any abstraction that can be resolved to a set of indices/shards. We 
define a component of an index abstraction to be some searchable unit of the index abstraction.
2025-01-08 11:37:03 -05:00
Albert Zaharovits
12eb1cfda1
Metrics for indexing failures due to version conflicts (#119067)
This exposes new OTel node and index based metrics for indexing failures due to version conflicts.

In addition, the /_cat/shards, /_cat/indices and /_cat/nodes APIs also expose the same metric, under the newly added column iifvc.

Relates: #107601
2025-01-08 12:34:37 +00:00
Yang Wang
e1151ef1ba Merge main into multi-project 2025-01-06 13:30:02 +11:00
Oleksandr Kolomiiets
8ca74fb956
Revert "Extract synthetic source logic from DocumentParser (#116049)" (#119530)
This reverts commit e8d32afdf4.
2025-01-03 12:03:40 -08:00
Simon Cooper
955a702726 Make MetadataIndexTemplateService work on ProjectMetadata objects (MP-1887)
As a precursor to converting the reserved state handlers to work on
`ProjectMetadata`, convert `MetadataIndexTemplateService` to work on
`ProjectMetadata`, with temporary adaptor methods.
2025-01-03 10:14:38 +00:00
Tim Vernum
4ff691f066 Merge revision 7fb6ca447a into multi-project 2024-12-31 15:41:02 +11:00
Rene Groeschke
ba61f8c7f7
Update Gradle wrapper to 8.12 (#118683)
This updates the gradle wrapper to 8.12

We addressed deprecation warnings due to the update that includes:

- Fix change in TestOutputEvent api
- Fix deprecation in groovy syntax
- Use latest ospackage plugin containing our fix
- Remove project usages at execution time
- Fix deprecated project references in repository-old-versions
2024-12-30 15:34:24 +01:00
Oleksandr Kolomiiets
e8d32afdf4
Extract synthetic source logic from DocumentParser (#116049) 2024-12-24 11:41:44 -08:00
Yang Wang
2fece80ac3 fix compilation and adapt multi-project 2024-12-22 21:02:27 +11:00
Yang Wang
e790688377 Merge main into multi-project 2024-12-22 19:36:33 +11:00
Mary Gouseti
b6345a3b81
[9.0] Remove unsupported value for the query param wait_for_active_shards in close API. (#118555)
Since 8.0, the default behavior for closing indices has been to wait for the active shards based on the index setting. The special value index-setting allows users to use this in 7.x as well. We'd like to make true our promise in the deprecation warning that this parameter should no longer be used, since it will become unsupported in 9.0.0.
2024-12-19 23:00:36 +02:00
Pete Gillin
97e6bb6ce3
Add cluster setting to enable failure store (#118662)
This setting enables or disables the failure store for data streams
based on matching the data stream name against a list of patterns. It
acts as a default, and is overridden if the failure store is
explicitly enabled or disabled either in a component template or using
the data stream options API.

(See the PR for explanations of some of the changes here.)
2024-12-19 16:55:54 +00:00
Niels Bauman
5e3d11a8a0 Merge main into multi-project 2024-12-19 12:45:16 +01:00
Mary Gouseti
4efeca83b4
[Failure store] Reconciliate failure indices during snapshotting (#118834)
In this PR we reconciliate the failure indices of a data stream just
like we do for the backing indices. The only difference is that a data
stream can have an empty list of failure indices, while it cannot have
an empty list of backing indices.

An easy way to create a situation where certain backing or failure
indices are not included in a snapshot is via using exclusions in the
multi-target expression of the snapshot. For example:

```
PUT /_snapshot/my_repository/my-snapshot?wait_for_completion=true
{
  "indices": "my-ds*", "-.fs-my-ds-000001"
}
```
2024-12-19 21:20:12 +11:00
Yang Wang
c416f251cb Make open/close index and add index blocks work with multi-project (MP-1870)
This PR makes open/close indices and add index blocks work by replaces a
large percentage of usages for the deprecated methods with the
corresponding project-aware versions. The ones that are no longer used
are removed. Some deprecated methods still remain after this PR. They
require even more cascading changes in areas that have not been touched,
such as snapshot/restore, watcher, security index settings etc. I prefer
to leave them out since this PR is already big enough. The main changes
are in MetadataIndexStateService class where both routing table and
metadata need to be specific to the right project.
2024-12-18 01:33:35 +00:00
Niels Bauman
26f991a055 Make rollover project aware (MP-1846)
Makes both alias and data stream rollover project aware.
2024-12-12 19:00:25 +00:00
Tim Vernum
c57d41d0ff Merge revision 0d57e1025e into multi-project 2024-12-11 15:25:03 +11:00
Mary Gouseti
5997fc3d6f
Introduce data stream options via dedicated classes (#117357)
In this PR we move the failure store configuration from the
`data_stream` in a composable index template to the `template` section
under the `data_stream_options`. The reason for this change is that we
want to be able to compose the failure store configuration via component
templates.

**Previous composable index template**

```
{
  "index_patterns": [....],
  "template": { 
      ......
  },
  "data_stream": {
    "failure_store": true
  }
}
```

**New composable index template**

```
{
  "index_patterns": [....],
  "template": { 
      "data_stream_options": {
        "failure_store": {
          "enabled": true
        }
      },
      ......
  },
  "data_stream": {}
}
```

**Composition logic**

| Component Template A | Composable Index Template | Resolved data
stream options |
|-------------------------|-----------------------------|-------------------------------|
| `{"failure_store": {"enabled": true}}` | - |`{"failure_store":
{"enabled": true}}`| | `{"failure_store": {"enabled": true}}` |
`{"failure_store": {"enabled": false}}` |`{"failure_store": {"enabled":
false}}`| | - | `{"failure_store": {"enabled": true}}`
|`{"failure_store": {"enabled": true}}`| | `{"failure_store": null}` |
`{"failure_store": {"enabled": true}}` |`{"failure_store": {"enabled":
true}}`| | `{"failure_store": {"enabled": true}}` | `{"failure_store":
null}` |`{}`|

More context and discussions can be found in the comments of
https://github.com/elastic/elasticsearch/pull/113863.
2024-12-10 19:12:30 +11:00
Simon Cooper
84a5424aad Set standard randomProjectId method to sometimes return the default id (MP-1853) 2024-12-06 14:25:13 +00:00
Niels Bauman
e0c83ef783 Merge main into multi-project 2024-12-05 14:34:31 +01:00
Niels Bauman
ffe911bd3c Merge main into multi-project 2024-12-05 13:25:44 +01:00
Niels Bauman
26c88c1050 Make UpdateTimeSeriesRangeService project aware (MP-1844)
Updates the service to process data streams in all projects.
2024-12-05 11:55:44 +01:00
Armin Braun
eb0020f055
Introduce more parallelism into cross cluster test bootstrapping (#117820)
We can parallelize starting the clusters and a few other things
to effectively speed up these tests by 2x which comes out to about a minute
of execution time saved for all of those in :server:internalClusterTests
on my workstation.
2024-12-04 21:04:11 +01:00
Nhat Nguyen
ef11b44b43
Acquire stats searcher for data stream stats (#117953)
Here, we only need to extract the minimum and maximum values of the 
timestamp field; therefore, using a stats searcher should suffice. This
is important for frozen indices.
2024-12-04 07:32:00 -08:00
Yang Wang
da8a473134 Merge main into multi-project 2024-12-04 16:26:03 +11:00
Keith Massey
c30ef960ad
Moving the data stream reindex task to x-pack (#117927) 2024-12-03 15:53:41 -06:00
Niels Bauman
1fd8a8ba34 Allow creating and retrieving data streams in multiple projects (MP-1817)
Modifies the PUT and GET data stream APIs to be project-aware.
2024-12-03 09:14:21 +00:00
Niels Bauman
a008545bf3 Merge remote-tracking branch 'public/main' into merge-main 2024-11-26 13:10:41 +01:00
Nhat Nguyen
631345f965
Adjust index version for deprecating source mode (#117183)
There was a bug in the version-checking logic for emitting deprecation 
warnings for source.mode in mappings.
2024-11-25 10:20:58 -08:00
Yang Wang
b8f8656fda Merge main into multi-project 2024-11-23 16:55:53 +11:00
Rene Groeschke
f6ac6e1c3b
[Build] Remove deprecated BuildParams (#116984) 2024-11-22 16:30:57 +01:00
Niels Bauman
a40ad7df09 Make data stream deletion project-aware (MP-1678)
This commit allows the data stream deletion API to function in a
multi-project setting.
2024-11-21 15:25:55 +00:00
Tim Vernum
b3555fe799 Fix merge 2024-11-21 21:33:44 +11:00
Tim Vernum
442138e86d Merge main into multi-project 2024-11-21 21:10:53 +11:00
Tim Vernum
192ed6c5a4 Merge main into multi-project 2024-11-21 11:25:11 +11:00
Keith Massey
afa3abcec5
Reindex data stream persistent task (#116780) 2024-11-20 17:34:44 -06:00
Salvatore Campagna
04ca505952
Fix LogsDB plugin initialisation of cluster.logsdb.enabled (#116825) 2024-11-19 21:07:54 +01:00
Tim Vernum
4cfb619448 Merge main into multi-project 2024-11-19 18:22:02 +11:00
Simon Cooper
c832572709
Remove some historical features (#116926)
Historical features are now trivially true on v9 - so we can remove the features, and the check.
Historical features do not affect cluster state, so this has no compatibility restrictions.
2024-11-18 14:33:05 +00:00
Niels Bauman
0edb9fa778 Merge remote-tracking branch 'public/main' into merge-main
# Conflicts:
#	server/src/main/java/org/elasticsearch/action/search/TransportSearchShardsAction.java
#	server/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocationStatsService.java
#	server/src/main/java/org/elasticsearch/gateway/GatewayMetaState.java
#	server/src/main/java/org/elasticsearch/plugins/Plugin.java
#	server/src/test/java/org/elasticsearch/gateway/GatewayMetaStateTests.java
#	server/src/test/java/org/elasticsearch/ingest/IngestMetadataTests.java
2024-11-18 10:53:12 +01:00
Rene Groeschke
13c8aaeffa
[Gradle] Remove static use of BuildParams (#115122)
Static fields dont do well in Gradle with configuration cache enabled.

- Use buildParams extension in build scripts
- Keep BuildParams.ci for now for easy serverless migration
-  Tweak testing doc
2024-11-15 17:58:57 +01:00
Ankita Kumar
713788dbce
Fix and add a test for failure store with Incremental bulk (#115866)
When a document is rejected because of indexing pressure, it should not be redirected to the failure store.

The failure store is not meant to be a dead letter queue - it’s a best effort storage location for documents that cannot be ingested because there is some kind of fault in their shape or content, this way a user can fix them.

In the case of indexing pressure there is nothing wrong with the document itself. In this PR we fix the redirection to the failure store and we add an integration test to test the interaction of the failure store and incremental bulk's short circuit failure feature.

Closes ES-9577.

Co-authored-by: gmarouli <mary.gouseti@elastic.co>
2024-11-14 19:19:27 -05:00