Commit graph

2284 commits

Author SHA1 Message Date
Ryan Ernst
55677728b4
Fix windows memory locking (#111866) (#111935)
Memory locking on Windows with the bundled jdk was broken by native
access refactoring. This commit fixes the linking issue, as well as adds
a packaging test to ensure memory locking is invoked on all supported
platforms.
2024-08-16 05:53:54 +10:00
Mark Vieira
8e6507b950
Make ConfigurationTests.test20HostnameSubstitution more resilient (#111216) (#111218)
This is an attempt to fix occasional test failures where asserting on a
request response fails because the cluster has not finished
initialization and cannot yet serve requests.

Closes #109660
2024-07-24 10:13:01 +10:00
Mark Vieira
00cfa68336
Make docker packaging test more resilient (#111205) (#111210)
Wrap check for container shutdown log message in an `assertBusy()` to
deal with race conditions.

Closes #111132
# Conflicts:
#	muted-tests.yml
2024-07-24 05:33:27 +10:00
Mark Vieira
7cdc1b0df0
Unmute DockerTests.test600Interrupt (#111165) (#111168)
Investigating https://github.com/elastic/elasticsearch/issues/111132 and
it seems this test has been muted on `main` for some time. Let's unmute,
to see if this is specific to the 7.17 branch or not.
2024-07-23 04:58:50 +10:00
Rene Groeschke
7ee9a24177
Ignore configs from DistributionDownload plugin and bwc for resolveAllDependencies (#110828) (#110834) 2024-07-13 02:23:27 +10:00
Rene Groeschke
5bce26ca74
[CI] Do not cache any es distros when creating ci images (#110742) (#110745)
(cherry picked from commit 816cedc217)

# Conflicts:
#	qa/packaging/build.gradle
2024-07-11 16:42:17 +02:00
Alexander Spies
2876e059f3
Aggs: Improve scripted metric agg allow list tests (#110153)
* Add an override to the aggs tests to override the allow list default setting. This makes it possible to run the scripted metric aggs tests on Serverless, even when we disallow these aggs per default on Serverless.
* Move the allow list tests next to the scripted metric tests since these belong together.
2024-06-28 11:47:30 +02:00
Lorenzo Dematté
abcc38388d
Add request metric to RestController to track success/failure (by status code) (#109957)
* Propagate TelemetryProvider in place of Tracer
* Add counter for rest requests, with RestHandler name and response status-code attributes
2024-06-27 12:18:52 +02:00
David Turner
5662f988b2
Remove trappy timeouts in snapshot APIs (#109828)
Wholesale fix of every `TRAPPY_IMPLICIT_DEFAULT_MASTER_NODE_TIMEOUT` in
`o.e.snapshots` and `o.e.repositories`, just pulling them up to the REST
layer (where they become API params), the test suite (where they become
`TEST_REQUEST_TIMEOUT`), or some other place where an explicit value is
available.

Relates #107984
2024-06-21 07:11:12 +10:00
Patrick Doyle
43b2e877e0
Revert "Move PluginsService to its own internal package (#109872)" (#109946)
This reverts commit b9e7965184.
2024-06-19 18:10:50 -04:00
Patrick Doyle
b9e7965184
Move PluginsService to its own internal package (#109872)
* Mechanical package change in IntelliJ
* A couple of manual fixups
* Export plugins.loading to deprecation
* Put plugin-cli in a module so can export PluginsUtils to it.
2024-06-19 15:23:47 -04:00
Mark Vieira
44f5968448
Adjust packaging test exit code assertion (#109879) 2024-06-18 13:33:44 -07:00
Benjamin Trent
411ff56458
Always refresh indices to ensure vectors are searchable in VectorSearchIT (#109864)
There are some weird failures here and there indicating that a segment
might not have been flushed and refreshed for search.

Related: https://github.com/elastic/elasticsearch/issues/109628
2024-06-19 03:16:28 +10:00
Benjamin Trent
b147d07533
Muting PackageTests class #109852 (#109874)
* Muting PackageTests class #109852

* fixing mute
2024-06-18 12:13:50 -04:00
Benjamin Trent
429c970dd3
Muting test70RestartServer for issue #109852 (#109860) 2024-06-19 00:06:01 +10:00
David Turner
e66cb6c632 AwaitsFix for #109852 2024-06-18 13:30:34 +01:00
Benjamin Trent
3aed0afb2b
Add new int4 quantization to dense_vector (#109317)
This adds a new quantization mechanism for HNSW and flat indices. Here
we add `int4` quantization via the `int4_hnsw` and `int4_flat` index
types. This quantization methodology further reduces the memory required
for fast HNSW, meaning that the memory required is 8x smaller than with
regular float32 values. 

8x reduction means that 1M 1024 dimension vectors goes from requiring
3.8GB to 477MB.

Recall continues to stay steady, there is some reduction that is
recoverable via slightly oversampling and reranking. For example over
500k CohereV3 vectors, only 5 extra vectors are required to be gathered
to achieve over 0.98 recall in a brute-force scenario.

![recall](b47a79d0-020d-4baa-8199-41a932df00f7)
2024-06-18 00:15:43 +10:00
Benjamin Trent
fdd183ddbd Merge branch 'lucene_snapshot_9_11' 2024-06-12 10:51:02 -04:00
Alexander Spies
e540732e39
Aggs: Scripted metric allow list (#109444)
Introduces new cluster settings that allow only a certain set of scripts in scripted metrics aggregations:
- search.aggs.only_allowed_metric_scripts, defaults to false
- search.aggs.allowed_inline_metric_scripts, defaults to empty list
- search.aggs.allowed_stored_metric_scripts, defaults to empty list
2024-06-12 14:23:03 +02:00
Benjamin Trent
08298dcd69 Merge remote-tracking branch 'upstream/main' into lucene_snapshot_9_11 2024-06-12 08:05:36 -04:00
Tommaso Teofili
67f85ebea0
DenseVectorMappingUpdateIT BWC fix (#109620) 2024-06-12 13:38:32 +02:00
Martijn van Groningen
696191d1c7
Fix testMapperDynamicIndexSetting() failures (#109574)
Currently these tests run against any old cluster older than 8.0.0, but
the fix that allowed `index.mapper.dynamic` to exist is only available
in 7.17.22.

Adjust these tests to only run if old cluster is after version 7.17.21
and before 8.0.0
2024-06-12 12:06:41 +10:00
Przemyslaw Gomulka
71d2faa631
Remove :qa:apm module (#109565)
the test was disabled due to problem with availability of docker images after the release.
It was reimplemented in :test:external-modules:apm-integration TracesApmIT

closes #90308
2024-06-11 15:05:02 +02:00
Benjamin Trent
29288d6590 Merge remote-tracking branch 'upstream/main' into lucene_snapshot_9_11 2024-06-11 06:54:23 -04:00
Luca Cavanna
9647f6bd12
Don't set number of shards to 0 for system indices that use auto-expand replicas (#108994)
Many of our system indices that rely on auto_expand_replicas get created providing a manual number of replicas. Such number will be immediately overridden by the auto expand replicas functionality according to the number of data nodes available. While this causes no harm, it seems misleading and unnecessary, a potential misuse that we can avoid for indices that we create ourselves.

Ideally we'd even prevent this from happening by rejecting such index creation requests, but that would be a breaking change that we'd prefer not to make at this time.
2024-06-11 12:52:20 +02:00
Martijn van Groningen
09fc32090c
Re-define index.mapper.dynamic setting in 8.x (#109341)
Currently when upgrading a 7.x cluster to 8.x with
`index.mapper.dynamic` index setting defined the following happens:

- In case of a full cluster restart upgrade, then the index setting gets archived and after the upgrade the cluster is in a green health.
- In case of a rolling cluster restart upgrade, then shards of indices with the index setting fail to allocate as nodes start with 8.x version. The result is that the cluster has a red health and the index setting isn't archived. Closing and opening the index should archive the index setting and allocate the shards.

The change is about ensuring the same behavior happens when upgrading a
cluster from 7.x to 8.x with indices that have the
`index.mapper.dynamic` index setting defined.  By re-defining the
`index.mapper.dynamic `index setting with
`IndexSettingDeprecatedInV7AndRemovedInV8` property, the index is
allowed to exist in 7.x indices, but can't be defined in new indices
after the upgrade. This way we don't have to rely on index archiving and
upgrading via full cluster restart or rolling restart will yield the
same outcome.

Based on the test in #109301. Relates to #109160 and #96075
2024-06-11 18:17:48 +10:00
Tommaso Teofili
7e7f8a379a
Make dense vector field type updatable (#106591) 2024-06-10 18:39:02 +02:00
Oleksandr Kolomiiets
1080425a65
Enable fallback synthetic source by default (#109370) 2024-06-07 09:21:22 -07:00
elasticsearchmachine
b35239c952 Merge remote-tracking branch 'origin/main' into lucene_snapshot 2024-05-29 10:01:31 +00:00
Simon Cooper
8329a094ab
Add permission to secure access to certain config files (#107827)
This adds a SecuredFileAccessPermission that Elasticsearch and plugins can use to limit access to certain files, so that only code that also has that same permission can access the specified files
2024-05-28 12:46:15 +01:00
elasticsearchmachine
83f51b477e Merge remote-tracking branch 'origin/main' into lucene_snapshot 2024-05-28 10:01:58 +00:00
Rene Groeschke
2704d3a8d1
Remove cross project support in TestFixturesPlugin (#109077)
- One step closer to configuration cache support
- Crossproject support has been replaced by using testcontainer based fixtures
2024-05-27 17:59:14 +02:00
elasticsearchmachine
a40ead0f09 Merge remote-tracking branch 'origin/main' into lucene_snapshot 2024-05-27 10:02:23 +00:00
Ryan Ernst
a4588c0e3f
Run bootstrap checks in packaging tests (#109031)
Bootstrap checks are an important part of ensuring proper Elasticsearch
configuration. They are often system dependent, so checking they work on
each supported platform should be part of testing. This commit adjusts
packaging tests to enable bootstrap checks.
2024-05-24 18:32:37 -04:00
elasticsearchmachine
7bd291d726 Merge remote-tracking branch 'origin/main' into lucene_snapshot 2024-05-21 10:01:52 +00:00
Ryan Ernst
bc499e7c83
Move rlimit calls into NativeAccess (#108805)
This commit moves getting max threads, max virtual memory size, and max
file size into NativeAccess.

relates https://github.com/elastic/elasticsearch/pull/104876
2024-05-20 11:09:50 -04:00
Mike Pellegrini
8bc1a47588
Semantic Query (#108483)
Add the semantic query to the Query DSL, which is used to query semantic_text fields

---------

Co-authored-by: carlosdelest <carlos.delgado@elastic.co>
Co-authored-by: Jim Ferenczi <jim.ferenczi@elastic.co>
2024-05-20 09:36:22 -04:00
Ryan Ernst
29d6023de8
Rename MockLogAppender to MockLog (#108803)
Now that mock logging has a single internal appender, the "appender"
suffix for MockLogAppender doesn't make sense. This commit renames the
class to MockLog. It was completely mechanical, done with IntelliJ
renames.
2024-05-20 06:22:49 -07:00
elasticsearchmachine
a14514c176 Merge remote-tracking branch 'origin/main' into lucene_snapshot 2024-05-16 10:01:28 +00:00
Ryan Ernst
b37d9358e7
Fix DockerTests.dumpDebug to read the container logs (#108652)
This commit overrides dumpDebug for DockerTests to pull the log from
docker rather than looking in the filesystem.
2024-05-15 19:23:06 -04:00
Ryan Ernst
9ae678da81
Wait for readiness in docker readiness test (#108681)
Previously readiness waited only on a master node being elected.
Recently it was also made to wait on file settings being applied. Yet
the node may be fully started before those file settings are applied.
The test expected readiness was ok after the node finishes starting.

This commit retries the readiness check until it succeeds since
readiness state will be updated async to the node finishing starting.

closes #108523
2024-05-15 15:29:06 -07:00
elasticsearchmachine
0ce5dadc6b Merge remote-tracking branch 'origin/main' into lucene_snapshot 2024-05-15 10:02:23 +00:00
Nikolaj Volgushev
e6d38bb43b
Mute test500Readiness (#108661)
Mute for: https://github.com/elastic/elasticsearch/issues/108523
2024-05-15 04:28:50 -04:00
elasticsearchmachine
46a9663957 Merge remote-tracking branch 'origin/main' into lucene_snapshot 2024-05-14 10:01:36 +00:00
Ievgen Degtiarenko
d3a285e1c7
Fix testDanglingIndicesCanBeListed (#108599)
The test started failing because of the recent changes to allow closing (and deleting shards) asynchronously. As a result dandling index API now is seeing a directory in partially deleted state, fails to interpret partial data and fails as a result.
The fix retries the failure on the client.
2024-05-14 11:40:27 +02:00
Ryan Ernst
bf96968ea0
Debug docker readiness tests (#108587) 2024-05-13 21:53:39 -07:00
Ryan Ernst
b02d06c2d2
Make MockLogAppender itself Releasable (#108526)
Existing uses of MockLogAppender first construct an appender, then call
capturing on the instance in a try-with-resources block. This commit
adds a new method, capture, which creates an appender and sets up the
capture the the same time. The intent is that this will replace the
existing capturing calls, but there are too many to change in one PR.
2024-05-13 07:50:58 -07:00
ChrisHegarty
e8faece732 Merge branch 'main' into lucene_snapshot 2024-05-13 11:35:51 +01:00
Mark Vieira
64ef2f42c2
AwaitsFix #108523 2024-05-10 17:19:48 -07:00
Simon Cooper
d6cb12ec8f
Properly support capabilities checks with mixed version clusters (#108513)
When a capabilities check is done on a cluster with some nodes that do not support capabilities, always return false
2024-05-10 16:29:01 +01:00