Commit Graph

2462 Commits

Author SHA1 Message Date
Nik Everett a80402b13b
TSDB: Remove test compatibility for untested (#124113)
Removes testing compatibility switches for versions we no longer test
against.
2025-03-10 10:53:51 -04:00
Armin Braun 425823cb5c
Remove some overhead from TransportService message handling (#124428)
Avoiding some indirection, volatile-reads and moving the listener
functionality that needlessly kept iterating an empty CoW list (creating
iterator instances, volatile reads, more code) in an effort to improve
the low IPC on transport threads.
2025-03-09 16:00:11 +01:00
Martijn van Groningen ea8283e9c8
Avoid serializing empty _source fields in mappings. (#122606) 2025-03-06 12:20:07 +01:00
Martijn van Groningen 26de5343a2
Remove synthetic recovery source feature flag. (#122615)
This feature flag controls whether synthetic recovery source is enabled by default when the source mode is synthetic.

The synthetic recovery source feature itself is already available via the index.recovery.use_synthetic_source index setting and can be enabled by anyone using synthetic source.

The default value of index.recovery.use_synthetic_source setting defaults to true when index.mapping.source.mode is enabled. The index.mapping.source.mode default to true if index.mode is logsdb or time_series.

In other words, with this change synthetic recovery source will be enabled by default for logsdb and tsdb.

Closes #116726
2025-03-05 15:43:33 +01:00
Rene Groeschke 496c38e5a5
Reapply "Update Gradle wrapper to 8.13 (#122421)" (#123889) (#123896)
This reverts commit 36660f2e5f.
2025-03-05 08:02:13 +01:00
Mark Vieira d61b86477d
Add jdk.management.agent module to server boot layer on start (#123938) 2025-03-04 11:32:42 -08:00
Christoph Büscher 0f14c4f065
Add test for deprecated index settings in N-2 indices (#122493)
This change adds a new rolling upgrade test that checks having certain deprecated
index settings present in an N-2 index doesn't prevent the index from being opened
in the current version. The deprecated settings specifically tested here are:

* index.mapper.dynamic
* index.max_adjacency_matrix_filters
* index.force_memory_term_dictionary
* index.soft_deletes.enabled
2025-03-04 11:13:32 +01:00
Rene Groeschke 36660f2e5f
Revert "Update Gradle wrapper to 8.13 (#122421)" (#123889)
This reverts commit e19b2264af.
2025-03-03 15:51:07 +01:00
Rene Groeschke e19b2264af
Update Gradle wrapper to 8.13 (#122421)
* 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
2025-03-03 14:10:00 +01:00
Mark Vieira 9a37fbfbee
Remove NodesCapabilitiesUpgradeIT (#123561) 2025-02-27 16:31:38 -08:00
Mark Vieira b8b77eaa81
Remove XPackIT (#123558) 2025-02-27 16:31:27 -08:00
Mark Vieira d2da07716e
Remove rolling upgrade test that is no longer applicable (#123557) 2025-02-27 16:31:15 -08:00
Mark Vieira d9c0ef156a
Fix enrollment packaging test when running on Java 24 (#123650) 2025-02-27 14:40:27 -08:00
Mark Vieira feb3a60e98
Add forwards compatibility testing (#123436) 2025-02-26 08:56:30 -08:00
Simon Cooper 274be7997a
Create a SearchResponseBuilder for creating SearchResponses in tests (#122196)
As well as simplifying test code, this also highlights which settings in the response are actually needed for individual tests
2025-02-21 12:00:17 +00:00
Kostas Krikellas a79b15d414
[TEST] Cover basic license in logsdb rolling upgrade tests (#123095)
* Use min node version to guard injecting settings in logs provider

* Update docs/changelog/123005.yaml

* no random in cluster init

* Cover basic license in logsdb rolling upgrade tests
2025-02-21 11:17:06 +02:00
Benjamin Trent 894db68357
Potentially addressing bbq bwc failures and added logging (#122553)
I have ran this many times locally, and it never failed. Maybe there is
something "magical" in CI. 

Added some additional info in the assertion logging.
2025-02-19 03:46:04 +11:00
Moritz Mack d78bfe8f6e
Skip SM policy tests for JDK 24 when Security Manager is not available anymore (#122828) 2025-02-18 14:09:59 +01:00
Salvatore Campagna 780cac5a6d
Enable a sparse doc values index for `@timestamp` in LogsDB (#122161)
This PR extends the work done in #121751 by enabling a sparse doc values index for the @timestamp field in LogsDB.

Similar to the previous PR, the setting index.mapping.use_doc_values_skipper will override the index mapping parameter when all of the following conditions are met:

* The index mode is LogsDB.
* The field name is @timestamp.
* Index sorting is configured on @timestamp (regardless of whether it is a primary sort field or not).
* Doc values are enabled.

This ensures that only one index structure is defined on the @timestamp field:
* If the conditions above are met, the inverted index is replaced with a sparse doc values index.
* This prevents both the inverted index and sparse doc values index from being enabled together, reducing unnecessary storage overhead.

This change aligns with our goal of optimizing LogsDB for storage efficiency while possibly maintaining reasonable query latency performance. It will enable us to run benchmarks and evaluate the impact of sparse indexing on the @timestamp field as well.
2025-02-17 13:31:26 +01:00
Joe Gallo 5c00341c2b
Handle 404s from the _cat/indices api in FullClusterRestartIT (#122537) 2025-02-13 21:14:04 -05:00
Joe Gallo e082ad56bf
Update Maxmind mmdb fixture files (#122225) 2025-02-11 10:47:54 -05:00
Armin Braun d3abf9d5ba
Dry up search error trace ITs (#122138)
This logic will need a bit of adjustment for bulk query execution.
Lets dry it up before so we don't have to copy and paste the fix which
will be a couple lines.
2025-02-10 08:48:49 +01:00
Martijn van Groningen d93f9c4d58
Address synthetic recovery source release test failures. (#122035) 2025-02-07 13:02:27 -08:00
Mary Gouseti 1fe1055aef
[Deprecation API] Adjust details in the SourceFieldMapper deprecation warning (#122041)
In this PR we improve the deprecation warning about configuring source
in the mapping.

- We reduce the size of the warning message so it looks better in kibana.
- We keep the original message in the details.
- We use an alias help url, so we can associate it with the guide when it's created.
2025-02-08 04:55:14 +11:00
Salvatore Campagna d507f8f2e0
Re-enable synthetic recovery tests (#121896) 2025-02-06 14:22:56 +01:00
Ryan Ernst 0cf42f2388
Rename environment dir accessors (#121803)
The node environment has many paths. The accessors for these currently
use a "file" suffix, but they are always directories. This commit
renames the accessors to make it clear these paths are directories.
2025-02-05 14:03:28 -08:00
Artem Prigoda 885a5510e1
Don't return or accept `node_version` in the Desired Nodes API (#119049)
Re-submission of #114580

>  node_version was deprecated in #104209 (8.13) and shouldn't be set or returned in 9.0

Resolve ES-9443
2025-02-05 15:41:47 +01:00
Artem Prigoda 62f0fe869a
Remove the `failures` field from snapshot responses (#114496)
Failure handling for snapshots was made stricter in #107191 (8.15), so this field is always empty since then. Clients don't need to check it anymore for failure handling, we can remove it from API responses in 9.0
2025-02-05 15:35:38 +01:00
Salvatore Campagna 6a526755de
Use synthetic recovery source by default if synthetic source is enabled (#119110)
We experimented with using synthetic source for recovery and observed quite positive impact
on indexing throughput by means of our nightly Rally benchmarks. As a result, here we enable
it by default when synthetic source is used. To be more precise, if `index.mapping.source.mode`
setting is `synthetic` we enable recovery source by means of synthetic source.

Moreover, enabling synthetic source recovery is done behind a feature flag. That would allow us 
to enable it in snapshot builds which in turn will allow us to see performance results in Rally nightly
benchmarks.
2025-02-05 13:55:51 +01:00
Armin Braun a21b984561
Fix SearchResponse leak in CrossClusterSearchUnavailableClusterIT (#121681)
Fixing an obvious leak where we fail to count down 1 for a new search
response.
2025-02-04 19:30:45 +01:00
Christoph Büscher 954db370ef
Add migration test for .async-search system index (#121517)
This change adds migration testing for the ".async-search" system index
to the full cluster upgrade tests that perform updates from versions N-2
to N via N-1.
The test creates a system index by using async_search on a cluster with
version N-2, then calls the "_migrate" API in version N-1 and finally
checks that on the upgraded cluster in N we are still able to retrieve
async search results from previous versions and can still write to the
system index. This is necessary to ensure we don't end up with a
write-only async search system index when migrating to version 9.
2025-02-04 11:54:27 +01:00
Mary Gouseti 95c9b4b855
`DeprecationInfoAction` refactoring (#121181)
This refactoring was motivated by the following issues with the current
state of the code:

- The `TransformDeprecationChecker` is listed as plugin checker, but later we remove is from the `plugin_settings` and add it to the `cluster_settings`. This made me consider that the checker might be dealing with transform deprecation warnings but if they are listed under the `cliuster_settings`, it fits better to be part of `ClusterDeprecationChecker`.
- The `DeprecationInfo` is a data class, but it has a method `from` which constructs an `DeprecationInfo.Response` instance. However, this is not a simple factory class but it actually runs all the checks and it also tries to assert that it is not executed on a transport thread. Considering this, I thought it might fit better to the `TransportDeprecationInfoAction`, this way all the logic is in one place and all the checkers are wired and used in the same class.
- Constructing the node settings deprecation issues requires to merge the deprecation warnings of the individual nodes. We considered bringing together the execution of the remote request and the construction of the response in a new class called `NodeDeprecationChecker` that resembles the patterns of the other Checker classes.
- Reinstated the `PLUGIN_CHECKERS` even if we have only one check, so other developers can easier add their plugin checks.
- Finally, we noticed that the way we synthesise the remote requests is difficult to read and maintain because each call is nested under the previous one. We propose in this PR a different pattern that uses the `RefCountingListener` to combine the different remote calls and store their results in a container class named `PrecomputedData`
- **Bonus**: Removed the `LegacyIndexTemplateDeprecationChecker.java` which was not used.
2025-02-04 19:48:17 +11:00
Tanguy Leroux 106b66682e
[Test] Remove ASYNC translog durability in N-2 bwc upgrade tests (#121278)
When adding support for upgrading closed indices in 
N-2 version, I randomized the Translog.Durability setting 
of the closed index with the aim to test the 2 phases 
closing process.

This caused at least 1 test failure on Windows with the 
index being closed and the cluster upgraded before the 
synchronization of the translog had a chance to be 
executed. I think this cause the engine to be reset on 
the replica that is promoted as a primary, causing the 
loss of the operations that were not yet persisted.

Closes #121257
2025-02-03 12:05:30 +01:00
Mark Vieira 61dc93107f
Add lucene version compatibility tests (#121104)
This commit adds compatibility tests that target ES revisions that align with specific Lucene versions. In this case, we are intending to upgrade from Lucene 10.0 to 10.1. Since no on-prem Elasticsearch release exists with 10.0, we need another method to ensure compatibility with Lucene 10.0 indicies.

The work here is a bit hacky since all our compatibility testing infrastructure is centered around versions and we're now effectively doing compatibility tests between two different revisions of Elasticsearch that both report the same version. Ideally this specific testing would be replaced by unit tests, rather that reusing our full cluster restart tests for this purpose.

We'll also want to bump the commit referenced in the CI pipelines here to align with the last commit using Lucene 10.0.
2025-01-29 13:20:25 -08:00
Benjamin Trent 038aab864e
Mark bbq indices as GA and add rolling upgrade integration tests (#121105)
With the introduction of our new backing algorithm and making rescoring
easier with the `rescore_vector` API, let's mark bbq as GA. 

Additionally, this commit adds rolling upgrade tests to ensure
stability.
2025-01-30 01:58:08 +11:00
Tanguy Leroux 7b7cd1f87c
Support recovery for closed shard in N-2 version (#121141)
Allow shard recovery for shards in version N-2 that have been verified before being closed, but not verified as read-only, in 7.x or 8.x. Reopening such closed indices automatically adds an index.blocks.write.

Requires #120595 for the 8.x changes.

Closes ES-10320
Closes #121170
Closes #121171
2025-01-29 15:43:26 +01:00
Martijn van Groningen 952bf229fb
Conditionally enable logsdb by default (#121049)
Enable logsdb by default if logsdb.prior_logs_usage has not been set to true.

Meaning that if no data streams were created matching with the logs-- pattern in 8.x, then logsdb will be enabled by default for data streams matching with logs-*-* pattern.

Also removes LogsPatternUsageService as with version 9.0 and beyond, this component is no longer necessary.

Followup from #120708
Closes #106489
2025-01-29 15:03:28 +01:00
Tanguy Leroux 0569fc7f24
Forbid the removal of the write block if the index is read-only (#120648)
Ensure that a `write` block cannot be removed on a read-only compatible index in version N-2, while allowing to change a `read_only` block into a `write` block if needed as well as closing/reopening such indices.

Requires #120647 to be merged on `8.x`.

Relates ES-10320
2025-01-28 16:40:01 +01:00
Mary Gouseti 7322015761
[Deprecation API] Refactor resource deprecation checkers and add new resources. (#120505) 2025-01-28 13:00:27 +02:00
Slobodan Adamović 52e0f21bdd
Enable queryable built-in roles feature by default (#120323)
Making the `es.queryable_built_in_roles_enabled` feature flag enabled by default.
This feature makes the built-in roles automatically indexed in `.security` index and available
for querying via Query Role API. The consequence of this is that `.security` index is now 
created eagerly (if it's not existing) on cluster formation.

In order to keep the scope of this PR small, the feature is disabled for some of the tests, 
because they are either non-trivial to adjust or the gain is not worthy the effort to do it now. 
The tests will be adjusted in a follow-up PR and later the flag will be removed completely.

Relates to #117581
2025-01-27 10:25:54 +01:00
Martijn van Groningen cd10b05162
Turn _source meta fieldmapper's mode attribute into a no-op. (#119072)
Closes #118596
2025-01-24 09:25:55 +01:00
Tanguy Leroux 93bc7581ad
Follow ups after Add Index Block API changes for N-2 support (#120526)
This change contains follows ups now the Add Index Block API change is
merged.

The index setting `index.verified_read_only`can now be `PrivateIndex`
and not `Dynamic` anymore. Regular indices in version N-2 can recover if
they have the `index.block.read_only` too. And finally, upgrade tests
can use the Add Index Block API instead of manually flushing and adding
blocks explicitly.

This change requires #120537 for `8.x` (tests will fail until it is
merged).

Relates #119743 Relates #120522
2025-01-22 21:40:22 +11:00
Niels Bauman 5efe216958
Run `GetPipelineTransportAction` on local node (#120445)
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.

Relates #101805
2025-01-22 08:16:31 +10:00
Henning Andersen 5e8cce2187
Mark read-only flush and verify (#119743)
When marking read-only now flush and mark index as verified guaranteeing
that we can upgrade safely to next version with N-1 indices (becoming N-2).
Use this in the deprecation check.
2025-01-21 12:04:45 +01:00
Tanguy Leroux b1d4967a6c
Support regular indices in N-2 version (#119753)
This change allows indices created in version 7.x to be opened 
as read-only indices in a 9.0 cluster. It requires the corresponding 
change in 8.18 (#120105). To be opened as read-only, indices must 
be regular, searchable snapshot or legacy indices created in a N-2 
version. They must also have the index.blocks.write setting and 
regular indices require the additional index.verified_read_only.

Relates #120105
Relates ES-10320
2025-01-16 16:55:19 +01:00
Rene Groeschke 7b6bdfa323
[Gradle] Make rolling upgrade tests configuration cache compatible (#119577)
With this, all rolling upgrade tests that involve a
`nextNodeToNextVersion` update are gradle configuration cache
compatible.

Simplify API around test cluster registry and cc compatible usage of
test cluster in TestClusterAware tasks.
2025-01-16 23:23:04 +11:00
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
Niels Bauman 4ccd377d27
Run `TransportClusterGetSettingsAction` on local node (#119831)
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. The `?local` parameter
becomes a no-op and is marked as deprecated.
2025-01-14 03:45:58 +00:00
Niels Bauman 27a9c4d911
Run template simulation actions on local node (#120038)
The actions `TransportSimulateTemplateAction` and
`TransportSimulateIndexTemplateAction` solely need the cluster state,
they can run on any node. Additionally, they need to be cancellable
to avoid doing unnecessary work after a client failure or timeout.

As a drive-by, this removes more usages of the trappy default master
node timeout.
2025-01-14 12:41:05 +10:00
Simon Cooper da42d7710b
Reinstate old TransportVersion BwC condition (#119669)
QueryBuilderBWCIT needs to read serialized data created by <8.8 nodes throughout 9.x releases
2025-01-10 11:39:18 +00:00