Commit Graph

69665 Commits

Author SHA1 Message Date
Armin Braun 45aa5aea37
Tidy up some more of SharedBlobCacheService (#97867)
With the removal of some ref counting that one ensureOpen became
redunndant. Also, no need to keep a reference to the channel now that it
doesn't hold any state.
2023-07-24 10:12:37 +02:00
Marantidis Kiriakos ea42c2e076
boxplot support for transform 52189 (#96515) 2023-07-24 10:11:26 +02:00
Ignacio Vera 7ca4d488ae
Add test cluster setting to control the minimum number of docs in a concurrent slice (#97740)
The current slicing algorithm for concurrent search only creates multiple slices iff it can add at least 50k documents in each slice. This means that we need to have at least 100K documents in order to trigger concurrent search.

In tests, we can create several segments, but normally those segments contains few documents, therefore they will never trigger concurrent search.

This PR adds a cluster setting that can control the minimum number documents we require to create multiple slices. This setting is only registered on tests, therefore it is not exposed to the users. During test we can set this number to a
very low value to increase the likelihood that the test will exercise the concurrent code-path.

This change affects ESIntegTestCase as well as EsSingleNodeTestCase.

---------

Co-authored-by: Luca Cavanna <javanna@apache.org>
2023-07-21 02:06:26 +02:00
Przemyslaw Gomulka 6c45fec655
Allow validateModule task to work in serverless (#97690)
in serverless packages often are named with co.elastic prefix
validate module was preventing to use a convention where a dominating root package
is a name of the module.
This commit makes validateModule task to allow co.elastic module name
2023-07-20 16:08:20 -07:00
Ryan Ernst ca468f00b8
Fix main response to return build flavor (#97857)
Build flavor was added back in #97770, but the main endpoint response
is still hardcoded to "default". This commit updates the response to
return the flavor from the build info.
2023-07-20 15:15:18 -07:00
Ryan Ernst 57e3f0f9fe
Move xpack template resources to an isolated module (#97763)
Xpack core contains dozens of templates. These files are loaded via a
shared template utils method. While they should ideally be moved to
their appropriate modules, that would be large undertaking. This commit
moves these resources to a single module for xpack core (which may be
overriden by serverless).
2023-07-20 13:30:35 -04:00
David Turner 52565a3574
Improve exception handling in Coordinator#publish (#97840)
We shouldn't complete the publication listener under the `mutex`, and
it's a little tricky to see which exceptions are or are not impossible
from the way the code is written today.

This commit solves all that by throwing the exception out to a handler
outside the mutex, and splitting the enclosing `try...catch` block into
several smaller blocks.

It also fixes a bug where we could fail to complete the publish listener
if the publication failed to start properly. With this change, we now
clearly complete the publication listener on all failure paths.

Closes #97798
2023-07-20 16:38:49 +01:00
Armin Braun 629c442c36
Make SearchPhaseController.reducedQueryPhase a little cheaper (#97848)
Saw this one in recent profiling sessions -> remove redundant multiple
iterations of the results collection and cleanup slightly inefficient
assertion usage.
2023-07-20 11:00:44 -04:00
Armin Braun a969b65370
Cache latest file region in SharedBlobCacheService.CacheFile (#97834)
In many cases we access the same file in rapid succession. We can cache
the most recently accessed region in the file to avoid the costly lookup
from the CHM. We only do this for a time window that is inside the
throttle time for frequency counting in the LFU logic to avoid the
overhead of randomly jumping to a synchronized method on the fast-path.
2023-07-20 10:38:47 -04:00
David Turner 60935c68cc
Adjust sizing guidance re. doc count (#97831)
In #87246 we describe some reasons why it's a good idea to limit the doc
count of a shard, and we started to do so in #94065, so this commit
adjusts the sizing guidance docs to match.
2023-07-20 14:56:52 +01:00
Armin Braun bc29549401
Remove redundant ref-counting in SharedBytes.IO (#97843)
No need to use ref-counting here to keep the shared bytes alive after
they got closed. SharedBytes live for as long as the node lives, so if
this ever becomes an issues we should fix it by fixing the shutdown
order of services and not deal with the significant overhead of
ref-counting on every read.
2023-07-20 09:56:40 -04:00
Abdon Pijpelink e3c11016b9
[DOCS] Add tech preview admonition for geo line aggs on time-series data (#97844)
* Add tech preview admonition for time-series data

* Light editing
2023-07-20 15:40:12 +02:00
Luigi Dell'Aquila bcc2f23668
Refactor SQL analyzer and analyzer rules (#97836) 2023-07-20 14:26:23 +02:00
Luigi Dell'Aquila 62ee45c6a2
Refactor Div arithmetic function to accept data type explicitly (#97832) 2023-07-20 14:25:35 +02:00
David Roberts 067f5d3e9b
[ML] Fix ML usage action when ML sub-features are disabled (#97820)
To support differentiation of serverless product types it's now
possible to disable subsets of ML functionality.

The ML usage action was not updated to reflect this, so still
attempted to call actions to find out about usage of disabled
sub-features. Because that action is designed to never fail,
it actually returned reasonable output in these cases. However,
it generated a lot of log spam with warnings about calling
non-existent actions.

This PR adjusts the logic of the ML usage action to take into
account which sub-features might be disabled, and avoid calling
actions which won't exist in this case.
2023-07-20 12:34:37 +01:00
Iraklis Psaroudakis 3f9279df17
Mute testResetSystemIndices and feature-migration (#97781)
Relates #97780
2023-07-20 07:30:48 -04:00
Albert Zaharovits 6b1ff157f9
Remove explicit refresh_interval from identity-provider internal index (#97835)
The preference is now to rely on the implicit refresh_interval value
when creating internal indices.

Related #97815
2023-07-20 13:17:25 +03:00
Daniel Mitterdorfer 2e02758232
[Profiling] Support index migrations (#97773)
With this commit we add the required infrastructure to detect whether
indices need to be migrated and define migrations to update mappings or
dynamic index settings.
2023-07-20 10:49:09 +02:00
Abdon Pijpelink 40409bf8ca
[DOCS] Semantic search page (#97715)
Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
Co-authored-by: David Roberts <dave.roberts@elastic.co>
2023-07-20 10:45:13 +02:00
Albert Zaharovits b4fd3c837d
Remove explicit refresh_interval setting for Security system indices (#97815)
Security system indices should rely on the implicit
`index.refresh_interval` setting, which is tuned by "usecase", rather
than have it hard-coded by the Security plugin.
2023-07-20 04:32:34 -04:00
Rene Groeschke 3e13bd4d4c
Support different snyk organisations (#97808)
Tweaks our snyk integration to support different snyk orgs which is
required to have support for elasticsearch serverless. Also replaces
hardcoded remote url property by a dynamic version that resolves that
property from the git origin url.
2023-07-20 03:39:23 -04:00
Slobodan Adamović 53a635a6a2
Mention missing "_storage" internal user in docs (#97814)
This PR adds missing `_storage` internal user to the `internal-users.asciidoc`.
This user was added in 8.9.0 version.
2023-07-20 09:12:02 +02:00
Ievgen Degtiarenko af3cbe753d
Limit precision when formatting percentage in DesiredBalanceReconciler (#97811) 2023-07-20 08:36:22 +02:00
Saarika Bhasi 19c69a12a5
Add BWC tests for Analytics Collections and Query Rules- Part 3 (#97821)
* POST Analytics Event Response

* Query rules BWC tests

* Change access modifier to new ParseField

* Review: Field rename
2023-07-20 09:08:25 +05:30
Tim Vernum 4e1b3215b8
Upgrade xmlsec to 2.1.8 (#97741)
This upgrades org.apache.santuario:xmlsec to v2.1.8 

This is the most recent version in the 2.1.x line (to remain compatible
with opensaml 4.0)
2023-07-19 22:04:23 -04:00
Mary Gouseti 1162ad6e20
Rename the DataStreamLifecycle isEnabled to isFeatureEnabled (#97816) 2023-07-19 21:07:33 +03:00
Ryan Ernst 18329b0c82
Add back build flavor in build info (#97770)
The Build class keeps information about the running build of
Elasticsearch. There was previously a build flavor, which has since been
narrowed to just return the "default" flavor. This commit adds flavor
back to Build so that a plugged in Build can include a change to flavor.
2023-07-19 11:38:19 -04:00
Mary Gouseti 430cde6909
Improve the use of DataStreamLifecycle.Builder (#97744)
With the expansion of the data stream lifecycle configuration that is
coming (for example, downsampling). It will be helpful to reduce the
number of constructors and mainly use the builder to initialise the
DataStreamLifecycle object.
2023-07-19 10:13:57 -04:00
Luigi Dell'Aquila 9ab8f71b01
EQL: fix async missing events and re-enable the feature (#97718) 2023-07-19 16:01:39 +02:00
Ryan Ernst 57d5fbd639
Make build info pluggable internally (#97768)
This commit makes the Build.current() pluggable. This is only available
for internal builds.
2023-07-19 06:02:57 -07:00
David Turner c7c1dc1914
Add docs on troubleshooting NFS repos (#97601)
Spell out a bit more clearly that ES works through the OS's filesystem
abstraction, giving advice about how to reproduce problems outside of
ES.
2023-07-19 13:55:09 +01:00
Nicolas Chaulet a34ff55faa
[Fleet] Allow kibana_system to put datastream lifecycle (#97732) 2023-07-19 08:53:11 -04:00
Ioana Tagirta d2685926f3
Document dictionary parameter for Search Applications (#97501)
* Document dictionary parameter for Search Applications

* Address PR feedback
2023-07-19 14:26:16 +02:00
Jonathan Buttner d7bb3a99eb
[ML] Create task for model download (#97698)
* Adding task and parent association

* Experimenting with deleting on cancel

* Removing comments

* Refactoring tests

* Addressing PR feedback
2023-07-19 08:25:55 -04:00
István Zoltán Szabó 3fd94678e6
[DOCS] Adds important admonition to handling delayed data page (#97753) 2023-07-19 13:32:06 +02:00
David Turner 0b6055d65d
Improve chunking in desired balance API (#97800)
The desired balance API response is chunked but it includes the
`ClusterInfo` in a single chunk, and only splits up the routing table
into per-index chunks. This commit makes the chunking more fine-grained.
2023-07-19 06:49:41 -04:00
David Turner 00b5050cb2
Fix NPE in Desired Balance API (#97775)
If a shard has no desired assignment then we cannot send the desired
balance over the wire or render it as JSON because the
`ShardAssignmentView` is `null`. This commit replaces the spurious
`null` with an empty object, and cleans up the tests a little to remove
some unnecessary mocking.
2023-07-19 10:43:32 +01:00
Armin Braun 7e16d2759d
Speedup SharedBlobCacheService further (#97782)
* Avoid creating capturing lambda for hot-path region looking
* Made assertion code not run if asserts are off
   * and used proper atomic array instead of manually messing with an array of atomics in assertions
* Extracted cold path for init cache chunk
2023-07-19 05:37:14 -04:00
Iraklis Psaroudakis bf786f6df0
Mute testDieWithDignity (#97790)
Relates #97789
2023-07-19 05:22:58 -04:00
Iraklis Psaroudakis 32f7ae6d01
Mute testScheduleNowWithSystemClock (#97788)
Relates #95445
2023-07-19 05:18:30 -04:00
Iraklis Psaroudakis c78ff28b0f
Mute testTimeThrottle (#97786)
Relates #97518
2023-07-19 05:07:32 -04:00
David Turner 1ef7d3f419
Fix NPE in Desired Balance API (#97775)
If a shard has no desired assignment then we cannot send the desired
balance over the wire or render it as JSON because the
`ShardAssignmentView` is `null`. This commit replaces the spurious
`null` with an empty object, and cleans up the tests a little to remove
some unnecessary mocking.
2023-07-19 05:01:28 -04:00
Armin Braun f36542980a
Fix SharedBytesTests on Windows (#97720)
Can't use mmap on Windows, so disabling it here like was done for other
tests.

closes #97626
2023-07-19 10:56:38 +02:00
István Zoltán Szabó 57fd6b84fb
[DOCS] Expands ELSER tutorial with optimization info (#97392)
Co-authored-by: David Kyle <david.kyle@elastic.co>
2023-07-19 10:38:11 +02:00
Iraklis Psaroudakis 760efbf1e5
Mute some PkiAuthDelegationIntegTests (#97774)
Relates #97772
2023-07-19 04:20:02 -04:00
Jack Conradson ab65e6f15e
Fix `sub_searches` serialization bug (#97587)
We have allowed hybrid search since 8.4. This means the internal changes for sub_searches must be 
able to write a compound query as early as 8.4, but currently we only do that back to 8.8. This change 
fixes that issue.

Closes ##97144
2023-07-18 13:48:02 -07:00
Athena Brown b9f89f4516
Improve how connections are rejected after shutdown (#97737)
Prior to this PR, when a channel was accepted after Elasticsearch
received a shutdown signal, `AbstractHttpServerTransport` would directly
close the connection. This PR makes it throw an exception instead, which
results in the connection being closed by Netty. This keeps the flow of
control more consistent and readable, as well as logging additional
details such as the host which made the request.

This PR doesn't include any test changes because the behavior doesn't
really change in a way that's easy to test.
2023-07-18 16:46:18 -04:00
Martijn van Groningen 72901d4140
Change downsample threadpool size. (#97714)
Changed the downsample threadpool size to one eight of the allocated processors. Downsampling is a cpu intensive operation (search + heavy aggregation that rolls up documents) and could overwhelm a node. On top of this the downsample operation also delegates to force merge api, which has a threadpool that is also bounded to one eight of the allocated processors.

Relates to #97141
2023-07-18 20:38:31 +02:00
Mark Vieira 08f62752b8
Upgrade bundle JDK to Java 20.0.2 (#97758) 2023-07-18 09:50:39 -07:00
David Turner 2f5d8da13d
Fall back to join ping if not master (#97527)
The `JoinValidationService` doesn't need to send the cluster state if
we're not currently the master - instead it can just send a join ping.
This means it doesn't need to do any work adjusting the blocks.

Closes #97313
2023-07-18 12:48:59 -04:00