Commit Graph

84894 Commits

Author SHA1 Message Date
Martijn van Groningen 086329c5cb
Tidy up some noise during indexing with synthetic source. (#123724) 2025-02-28 16:52:17 +00:00
elasticsearchmachine e05304bc2d Mute org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT test {p0=search.vectors/41_knn_search_bbq_hnsw/Test knn search} #123727 2025-03-01 02:58:26 +11:00
Ievgen Degtiarenko 201a37012d
Document how to enable tracing (#123713) 2025-02-28 16:16:04 +01:00
Liam Thompson 91c2654570
Fix broken cross-repo links, versions in search connectors docker instructions (#123700) 2025-02-28 16:02:54 +01:00
Jake Landis 1f5e9655c6
unumte testWatcherWithApiKey (#123656) 2025-02-28 08:55:15 -06:00
Jonathan Buttner 4dcc81f0c4
Removing url and adding cause REST api response (#123638) 2025-02-28 08:24:57 -05:00
David Turner b7868ef554
Remove production `XContent` parser from `SnapshotIndexShardStatus` (#123608)
This parser is only used in tests, so this commit moves it to the test
code.
2025-02-28 22:35:35 +11:00
Lorenzo Dematté 6be0887778
Missing geoip policy (#123597) 2025-02-28 12:06:05 +01:00
Iván Cea Fontenla e8b01ff7c0
ESQL: Fix Driver status iterations and cpuTime (#123290)
Fixes https://github.com/elastic/elasticsearch/issues/122967

When the Driver reported status, if the "report at least every X time" report was triggered, it was re-adding the same iterations and cpuTime again, as it wasn't clearing it before the next iteration.
Now, there are separated variables for the last updated iterations and reported time.
2025-02-28 12:05:47 +01:00
Luca Cavanna 46fc7de3fb
Minor DocValuesDocReader cleanup (#123619)
The instance members can be private, all final, and SearchLookup is unused.
2025-02-28 10:08:06 +01:00
Ryan Ernst 71f72b9b91
Consolidate path setting files entitlements to config (#123649)
The setting based paths could be either absolute or relative, and they
are always relative to the config dir. This commit renames the
path_setting to make it clear it is related to config, and removes the
relative variant.
2025-02-28 01:38:51 +00:00
Yang Wang 7f501a5e27
Add a faster path for single default project retrieving (#123662)
This PR makes single default project retrieving faster by using a single
element map instead of a regular hash map.
2025-02-28 12:35:06 +11:00
Tim Vernum 2a17df58af
Only resolve project once in FieldCaps (#123664)
`TransportFieldCapabilitiesAction.doExecuteForked` would resolve the
project twice:
- Once implicitly when resolving indices from cluster state
- Another time to resolve index blocks

This changes this method to resolve `ProjectState` once and use that
instance for both index resolution and block checking
2025-02-28 01:22:00 +00: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
Alexey Ivanov ab835a96b1
Update elastic-apm-agent to support Java 24 (#123052)
Updates elastic-apm-agent to 1.52.2 to support Java 24.
2025-02-28 00:14:33 +00:00
Mark Vieira d9c0ef156a
Fix enrollment packaging test when running on Java 24 (#123650) 2025-02-27 14:40:27 -08:00
elasticsearchmachine 1abd7a134a Mute org.elasticsearch.entitlement.runtime.policy.PolicyManagerTests testFilesEntitlementsWithExclusive #123657 2025-02-28 09:37:36 +11:00
Joe Gallo 37f0b3c932
Adjust the versions for :modules:ingest-geoip:qa:full-cluster-restart 2025-02-27 16:00:49 -05:00
Rene Groeschke cd8fbab5b5
Fix some early tasks creations (#123637)
We want to use the task avoidance api whereever possible and delay task
creation
2025-02-28 07:54:01 +11:00
Luca Cavanna 905222613a
Disable concurrency when top_hits sorts on anything but _score (#123610)
We already disable inter-segment concurrency in SearchSourceBuilder whenever
the top-level sort provided is not _score. We shoudl apply the same rules
in top_hits. We recenly stumbled upon non deterministic behaviour caused by
script sorting defined within top hits. That is to be expected given that
script sorting does not support search concurrency.

The sort script can be replaced with a runtime field, either defined in the
mapping or in the search request, which does support concurrency and guarantees
predictable behaviour.
2025-02-27 21:22:17 +01:00
Mark Vieira 79c388a5b7
Don't use preemptive agents for forwards compat tests 2025-02-27 09:49:53 -08:00
Colleen McGinnis b7e3a1e14b
[docs] Migrate docs from AsciiDoc to Markdown (#123507)
* delete asciidoc files

* add migrated files

* fix errors

* Disable docs tests

* Clarify release notes page titles

* Revert "Clarify release notes page titles"

This reverts commit 8be688648d.

* Comment out edternal URI images

* Clean up query languages landing pages, link to conceptual docs

* Add .md to url

* Fixes inference processor nesting.

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Liam Thompson <leemthompo@gmail.com>
Co-authored-by: Martijn Laarman <Mpdreamz@gmail.com>
Co-authored-by: István Zoltán Szabó <szabosteve@gmail.com>
2025-02-27 17:56:14 +01:00
Armin Braun 2113a3c606
Remove needless contention in ContextIndexSearcher.timeoutOverwrites (#123609)
This doesn't have to be an instance variable nor does it need any
concurrency, it's per definition a thread-local variable so lets make it
one.
2025-02-27 17:50:17 +01:00
Rene Groeschke 17e35d431b
[IDEA] Enable Gradle Configuration Cache for Gradle Test Runner (#123552)
* [IDEA] Enable Gradle Configuration Cache for Gradle Runner

This should speedup repetitives usages of the Gradle Runner for the majority of test executions
We added a flag to disable it explicitly if it does not work for certain scenarios
2025-02-27 17:34:02 +01:00
elasticsearchmachine 84552f8d83 Mute org.elasticsearch.action.admin.cluster.node.tasks.CancellableTasksIT testChildrenTasksCancelledOnTimeout #123568 2025-02-28 01:55:15 +11:00
Niels Bauman 4b31293b6f
Fix `TimeSeriesDataStreamsIT.testShrinkActionInPolicyWithoutHotPhase` (#123153)
This test was muted, got fixed, and then was muted again but the issue
wasn't reopened (by accident it seems). Since that was 4 years ago, I'm
going to unmute this test and if it's still an issue, the new test
automation will open a new issue for it using the current muting
mechanism.

Relates #70595
2025-02-27 15:10:29 +01:00
Ievgen Degtiarenko 238b279f34
Fix cluster and node name in driver (#123601) 2025-02-27 14:57:52 +01:00
Nikolaj Volgushev a77626368f
Handle `NotEntitledException` in SSL file utils (#123491)
SSL file utils currently only handle security manager access control
exceptions around file read checks. This PR extends these to support
entitlement checks as well. 

There is no easy way to unit test this since we can't run unit tests
with entitlements enabled (for now). The PR includes a REST test
instead. 

Relates: https://github.com/elastic/elasticsearch/issues/121960
2025-02-28 00:06:09 +11:00
Yang Wang c7e7dbe904
Abort pending deletion on IndicesService stop (#123569)
When IndicesService is closed, the pending deletion may still be in
progress due to indices removed before IndicesService gets closed. If
the deletion stucks for some reason, it can stall the node shutdown.
This PR aborts the pending deletion more promptly by not retry after
IndicesService is stopped.

Resolves: #121717 Resolves: #121716  Resolves: #122119
2025-02-27 23:43:53 +11:00
Yang Wang 2c0fb18899
[Test] Do not use ExtrasFS for fileSettingsServiceTests (#123578)
The tests expect tightly controlled set of files and should not see
random extra files.
2025-02-27 22:42:17 +11:00
Armin Braun 43f3032db8
Inline some methods into Releasables (#123273)
Bit of a random find. Looks like we're effectively spending something
like ~0.5% of the total CPU time on resolving virtual calls for these
methods. Inlining `IOUtils` reduces their size quite a bit, removes
dead-code for rethrowing `IOException` that is never actually thrown
and hopefully as a result improve compilation a little here.
2025-02-27 12:09:36 +01:00
Liam Thompson 731a412326
Revert "Revert "[docs] Add the new docs CI checks"" (#123585)
* Revert "Revert "Add new docs actions (#123506)" (#123570)"

This reverts commit ee31c5a92d.

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-02-27 11:23:50 +01:00
Simon Cooper 06206cc66a Apply spotless directly 2025-02-27 10:17:17 +00:00
Simon Cooper be2c699ded
Use the correct id for the multi-project transport version (#123582) 2025-02-27 10:09:54 +00:00
Iván Cea Fontenla ca5d251807
ESQL: Fix function registry concurrency issues on constructor (#123492)
Fixes https://github.com/elastic/elasticsearch/issues/123430

There were 2 problems here:
- We were filling a static field (used to auto-cast string literals) within a constructor, which is also called in multiple places
- The field was only filled with non-snapshot functions, so snapshot function auto-casting wasn't possible

Fixed both bugs by making the field non-static instead, and a fix to use the snapshot registry (if available) in the string casting rule.
2025-02-27 11:05:18 +01:00
Moritz Mack 32826974e4
Add missing APM agent entitlements (#123575)
Add missing APM agent entitlements
2025-02-27 21:02:56 +11:00
Tim Vernum 1d3106f288 Merge branch 'feature/multi-project' 2025-02-27 19:51:21 +11:00
Tanguy Leroux e6eb8efba0
[Test] Add test for AWS SDKv1 swallowing exception at IndexputStream close time (#123505)
This change adds a unit test to demonstrate a specific 
behavior of the AWS SDKv1, which closes the InputStream 
used to upload a blob only after the HTTP request has 
been sent (this is to accomodate for retries). The SDK 
then swallows any exception thrown when closing the 
InputStream which has the effect to hide any potential 
CorruptIndexException that could have been detected 
at that time.

Relates ES-10931
2025-02-27 09:14:06 +01:00
Patrick Doyle a9e27a9eaa
More entitlements for bouncycastle (#123548) 2025-02-27 09:08:36 +01:00
Liam Thompson ee31c5a92d
Revert "Add new docs actions (#123506)" (#123570)
This reverts commit 4d5f9b2332.
2025-02-27 09:04:04 +01:00
Tim Vernum 783ce7a0d2
Merge branch 'main' into feature/multi-project 2025-02-27 15:33:46 +11:00
Yang Wang cea5adcb49
Add null check in more places for persistent tasks (#123566)
There is no guarantee that a project has non-null persistent tasks [0].
Null check is already done in most places. This PR adds it in a few more
places.

[0] Since health-node is now a cluster-scoped persistent task, it has
become more likely for the project-scoped tasks to be null.

Relates: #123262
2025-02-27 15:10:30 +11:00
Tim Vernum 779e1adc4a
Replace use of 'getProject' in RoutingNodes (#123567)
When #119968 was merged into multi-project we introduced a regression by
inserting a call to `.getProject()` within the `RoutingNodes` class that
was supposed to be multi-project-aware.

This commit replaces those calls with `.indexMetadata` lookups
2025-02-27 14:44:55 +11:00
Tim Vernum 10be77b5a6
Revert changes to DistributedArchitectureGuide.md (#123565)
This commit reverts the changes to

    docs/internal/DistributedArchitectureGuide.md

These changes need to be redone in order to update the code links
so that they point to a more recent version that includes the
`Metadata.ClusterCustom` / `Metadata.ProjectCustom` split

We also need to incorporate documentation updates to reflect the
changes to PersistentTasks.
2025-02-27 13:24:36 +11:00
Jack Conradson 3e3dfa4fb7
Add an exclusive parameter for files entitlements (#123087)
This adds an exclusive parameter for FilesEntitlement where a path can be made exclusive for a certain 
module. Should two modules attempt to both specify the same path as exclusive an exception is 
thrown.
2025-02-26 17:35:47 -08:00
Niels Bauman 92081d4cd2 Add MP fix annotation for cluster state listeners (MP-1966)
We're catching MP exceptions when applying cluster state listeners to
avoid noise in the logs, but we shouldn't forget to remove this `catch`
block at some point in the future.
2025-02-27 12:23:39 +11:00
Niels Bauman 2607f649d4 Make handling of failure during shard recovery project-aware (MP-1967)
When a shard recovery fails, we need to able able to handle that
properly when there are multiple projects.
2025-02-27 12:23:39 +11:00
Niels Bauman d20773577e Mark temporary metadata builder methods as deprecated (MP-1968)
These methods will be removed at some point in the future. By marking
them as deprecated, it'll be easier to spot that some code is using
these methods. Additionally, this will hopefully prevent people from
using these temporary methods.
2025-02-27 12:23:39 +11:00