Commit graph

75574 commits

Author SHA1 Message Date
István Zoltán Szabó
010243cad5
[DOCS] Updates the list of community contributed clients. (#105623) (#105733) 2024-02-22 14:47:00 +01:00
David Roberts
8744ebb246
[ML] Fix AutodetectMemoryLimitIT.testManyDistinctOverFields (#105727) (#105734)
It seems that the changes of https://github.com/elastic/ml-cpp/pull/2585
combined with the randomness of the test could cause it to fail
very occasionally, and by a tiny percentage over the expected
upper bound. This change reenables the test by very slightly
increasing the upper bound.

Fixes #105347
2024-02-22 08:37:09 -05:00
István Zoltán Szabó
bcaed123b8
[DOCS] Fixes get settings and update settings security API docs (#105686) (#105698)
* [DOCS] Fixes get settings and update settings security API docs.

* [DOCS] Further edits.
2024-02-21 15:25:38 +01:00
Moritz Mack
923ad1bc96
Fix EsAbortPolicy to not force execution if executor is already shutting down (#105666) (#105688)
Submitting a task during shutdown is highly unreliable and in almost all cases the task
will be rejected (removed) anyways. Not forcing execution if the executor is already
shutting down leads to more deterministic behavior and fixes
EsExecutorsTests.testFixedBoundedRejectOnShutdown.

(cherry picked from commit 954c428cde)
2024-02-21 07:05:04 -05:00
Luigi Dell'Aquila
68ef331daf
ES|QL: Set default query LIMIT to 1000 (#105618) (#105678) 2024-02-21 04:11:38 -05:00
Pat Whelan
032a50e9c2
[Transform] Fix testStopAtCheckpoint (#105664) (#105672)
Currently, there is a small chance that testStopAtCheckpoint will fail
to correctly count the amount of times `doSaveState` is invoked:
```
Expected: <5>
     but: was <4>
```

There are two potential issues:
1. The test thread starts the Transform thread, which starts a Search
   thread. If the Search thread starts reading from the
   `saveStateListeners` while the test thread writes to the
   `saveStateListeners`, then there is a chance our testing logic will
   not be able to count the number of times we read from
   `saveStateListeners`.
2. The non-volatile integer may be read as one value and written as
   another value.

Two fixes:
1. The test thread blocks the Transform thread until after the test
   thread writes all the listeners. The subsequent test will
   continue to verify that we can safely interlace reading and
   writing.
2. The counter is now an AtomicInteger to provide thread safety.

Fixes #90549
2024-02-20 15:48:01 -05:00
Jedr Blaszyk
0527fcd701
[Connector API] Bugfix: support list type in filtering advanced snippet value (#105633) (#105645) 2024-02-20 06:05:03 -05:00
Liam Thompson
b8524200de
[DOCS] [Remote clusters] Reference specific instructions for cloud trust (#105639)
(cherry picked from commit 4ee086e406)

Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
2024-02-20 10:37:46 +01:00
David Turner
460a19fc27
Expand docs about max-shards-per-node (#105607) (#105643)
Adds a little more detail on what sorts of problems may occur if you
exceed the default limits.
2024-02-20 04:01:16 -05:00
Felix Barnsteiner
72c7a0e69b
Fix parsing of flattened fields within subobjects: false (#105373) (#105638) 2024-02-20 02:59:09 -05:00
Liam Thompson
b1d7b2eb96
[DOCS] Fix sublist syntax (#105625) (#105627) 2024-02-19 10:43:20 -05:00
Niels Bauman
a5e2bd40ed
Add missing repository integrity docs for Health API (#105555) (#105624)
Follow up on #104614
2024-02-19 16:37:25 +01:00
David Turner
203f549e14
URLRepository should not block shutdown (#105588) (#105614)
Today a node with a registered `URLRepository` will not shut down
cleanly because it never releases the last of the `activityRefs`. This
commit fixes that.
2024-02-19 06:11:55 -05:00
Luigi Dell'Aquila
e91ab4c035
Disable insensitive equals operator (#105611) (#105613) 2024-02-19 06:11:27 -05:00
Ignacio Vera
e1a68fa7fd
GlobalOrdCardinalityAggregator should use HyperLogLogPlusPlus instead of HyperLogLogPlusPlusSparse (#105546) (#105602)
Use the generic HyperLogLogPlusPlus on GlobalOrdCardinalityAggregator so we promote the algorihtm to HLL when 
we reach the linear counting threshold.
2024-02-19 03:31:25 -05:00
Chris Cressman
e89c959b68
[DOCS] Promote webinar on Elasticsearch docs landing (#105594) (#105606)
Collaboration with Elastic Marketing
2024-02-19 03:11:49 -05:00
Albert Zaharovits
f934500c17
[Doc] API Key deletion settings (#105392) (#105599)
This documents API Key delete settings.
2024-02-18 10:56:59 -05:00
Andrei Stefan
00c32a11d1
ESQL: Add invalid mappings tests with fields from plugins (#105544) (#105587) 2024-02-16 05:14:30 -05:00
David Turner
127da57578
Fix use-after-free at event-loop shutdown (#105486) (#105575)
We could still be manipulating a network message when the event loop
shuts down, causing us to close the message while it's still in use.
This is at best going to be a little surprising to the caller, and at
worst could be an outright use-after-free bug.

This commit moves the double-check for a leaked promise to happen
strictly after the event loop has fully terminated, so that we can be
sure we've finished using it by this point.

Relates #105306, #97301
2024-02-15 15:24:11 -05:00
Lee Hinman
97fd8a7e39
Always show composed_of field for composable index templates (#105315) (#105572)
* Always show `composed_of` field for composable index templates

Prior to e786cfa706 we inadvertently always added composable index
templates with `composed_of: []` beacuse
e786cfa706 (diff-5081302eb39033199deb1977d544d1cd7867212a92b8d77e0aa0ded361272b11L618-L630)
created a new `ComposableIndexTemplate` from an existing one, and the `.composedOf()` field returned
an empty list of no component templates were provided:

89e714ee5d/server/src/main/java/org/elasticsearch/cluster/metadata/ComposableIndexTemplate.java (L172-L177)

This meant that before 8.12.0 we would always show `composed_of: []` for composable index templates.
This commit recreates this behavior, and always displays the empty list even if no component
templates are used by a composable index template.

Resolves #104627
2024-02-15 14:24:45 -05:00
Kathleen DeRusso
b81e0125ad
[8.13] Fix bug in rule_query where text_expansion errored because it was not rewritten (#105365) (#105564)
* Fix bug in rule_query where text_expansion errored because it was not rewritten (#105365)

* Update 260_rule_query_search.yml

Update test skip version
2024-02-15 13:43:27 -05:00
Brian Seeders
ad2bc23c2a
Renew samba fixture expired test certificates (#105561) (#105566)
(cherry picked from commit 15877f5593)
2024-02-15 10:43:36 -05:00
Jake Landis
b9aec3afdd
Update FIPS documentation for 8.x (#105041) (#105563)
This commit updates the documentation for FIPS support. 
In addition to the changes for 8.x it also provides more details for how to setup/configure FIPS mode.
2024-02-15 10:42:34 -05:00
Simon Cooper
afd2dc61b2
Update min CCS version to that used by 8.12 (#104739) (#105547) 2024-02-15 12:30:06 +00:00
Nikolaj Volgushev
85bf867ffd
Docs for hot-reloadable remote cluster credentials (#105483) (#105545)
Docs PR to accompany
https://github.com/elastic/elasticsearch/pull/103215.

Resolves: ES-7625
2024-02-15 06:20:25 -05:00
István Zoltán Szabó
4ea2ec1111
[DOCS] Adds docs to built-in and Eland model support in Inference API (#105500) (#105536)
Co-authored-by: Max Hniebergall <137079448+maxhniebergall@users.noreply.github.com>
2024-02-15 09:53:21 +01:00
Przemysław Witek
e5ebcc13c9
[Transform] Fix a bug where destination index aliases are not set up for an unattended transform (#105499) (#105534) 2024-02-15 03:20:26 -05:00
Costin Leau
a820a9ebbc
ESQL: Fix bug in grammar that allowed spaces inside id pattern (#105476) (#105532)
Change id pattern into a lexer rule and rely on fragments to avoid
 having whitespaces inside an id pattern

Fix #105441
2024-02-14 17:39:50 -05:00
Mark Vieira
e516f8c06d
Fix issue when installing multiple test cluster plugins (#105516) (#105519) 2024-02-14 16:11:36 -05:00
Nhat Nguyen
ce8f5441bf
Reserve bytes before fetching page (#105432)
Running heap-attack tests with multiple nodes can still lead to OOM 
errors. This is because the transport response messages are not tracked
by the circuit breaker. In heap attack tests, pages can be very large
(30MB — I will chunk them later), and for each exchange, we use three
concurrent channels, resulting in 100MB of untracked memory. This pull
request reserves extra bytes for exchange messages. Although this check
doesn't fully prevent OOM errors, it makes them unlikely in such cases.
2024-02-14 09:48:09 -08:00
Nhat Nguyen
b8d708bb96
Unwrap transport exceptions in exchange service (#105431)
We should unwrap TransportException errors; otherwise, we can return 
them to the caller instead of the actual underlying cause. This becomes
important when the underlying cause is a 4xx error, while 
TransportException is a 5xx error. I found this when running the
heap-attack tests
2024-02-14 09:47:11 -08:00
Mark Vieira
dbc653e4fd
Update docs preview link 2024-02-14 08:46:09 -08:00
Ignacio Vera
1fca7257b0
Make CoordinateEncoder an abstract class (#105502) 2024-02-14 17:28:52 +01:00
Ievgen Degtiarenko
bb0e8a4d86
additional test logging (#105508)
This change enables the following logging for the test:
* refreshed cluster info to ensure allocator is seeing correct data
* allocator trace logging to check the balance computation is correct
* reconciler debug logging to check if there is anything unexpected during reconciliation
2024-02-14 16:29:29 +01:00
Michael Peterson
84def3ad85
Async status response should set is_partial that same way that async response does (#104479) 2024-02-14 08:57:37 -05:00
Slobodan Adamović
4f07020084
Support excluding roles for SAML realm (#105445)
This PR adds a new `exclude_roles` setting  for SAML realm.  
This setting allows to exclude certain roles from being mapped 
to users that are authenticated via SAML realm - regardless of 
the configured role mappings.

The `exclude_roles` setting supports only explicit role names.
Regular expressions and wildcards are not supported.

The exclusion is possible only if the role mapping is handled 
by the SAML realm. Hence, it is not possible to configure it 
along with `authorization_realms` setting.

Note: It is intentional that this setting is not registered in this PR. 
The registration will be addressed in a separate PR.
2024-02-14 14:49:36 +01:00
Benjamin Trent
a874f47dd8
Include better output in profiling & toString for automaton based queries (#105468)
We have various automaton based queries that build particular automatons
based on their usage. However, the input text isn't part of the
`toString` output, nor the usage of the current query (wildcard,
prefix,etc.).

This commit adds a couple of simple queries to wrap some of our logic to
make profiling and other output more readable.

Here is an example without this change:

```
#(-(winlog.event_data.TargetUserName:AutomatonQuery {
org.apache.lucene.util.automaton.Automaton@2d13c057} winlog.event_data.TargetUserName:AutomatonQuery {
org.apache.lucene.util.automaton.Automaton@28daf002} winlog.event_data.TargetUserName:AutomatonQuery {
org.apache.lucene.util.automaton.Automaton@43c3d7f8} winlog.event_data.TargetUserName:AutomatonQuery {
org.apache.lucene.util.automaton.Automaton@2f52905} winlog.event_data.TargetUserName:AutomatonQuery {
org.apache.lucene.util.automaton.Automaton@31d75074})
```

We have 5 case-insensitive automatons, but we don't know which is which
in the profiling output. All we know is the originating field. 

I don't think we can update `AutomatonQuery` directly as sometimes the
automaton created mutates the term (prefix for example) and we lose that
we are searching for a prefix.
2024-02-14 08:46:08 -05:00
Tim Grein
42aaf085ff
[Connectors API] Fix typo in class docs (#105487) 2024-02-14 13:44:12 +01:00
Jedr Blaszyk
91e6fbc6d5
[Connector API] Add 8.13 docs (#105456) 2024-02-14 12:10:59 +01:00
Alexander Spies
7c385b001f
ESQL: Refactor EsqlTranslatorHandler (#105230)
* Move the expression translators into their own, dedicated class.
* Replace TrivialBinaryComparison and
   ExpressionTranslators.BinaryComparisons by a single translator
   handler.
2024-02-14 12:09:09 +01:00
Iraklis Psaroudakis
f871cb2364
Mute testClusterResolveDisconnectedAndErrorScenarios (#105492)
Relates #105489
2024-02-14 05:48:32 -05:00
Iraklis Psaroudakis
de5ec94b29
Mute RemoteClusterSecurityBwcRestIT (#105491)
Relates #104858
2024-02-14 05:41:36 -05:00
Iraklis Psaroudakis
6c3a9d10e3
Mute 3 SamlAuthenticationIT tests (#105488)
testLoginUserWithAuthorizingRealm testLoginUserWithSamlRoleMapping
testLoginWithWrongRealmFails

Relates #103595
2024-02-14 05:27:25 -05:00
David Turner
bb5eacf012
Improve CreateSnapshotStep failure message (#105480)
The wording is a little awkward, and it'd be more helpful to know
_which_ snapshot it was that failed. Also we can use `map` rather than
`delegateFailure` here.
2024-02-14 04:40:25 -05:00
Dmitry Cherniachenko
ba4d2f5843
Use Arrays.hashCode() for arrays in Objects.hash() calls (#105175)
When an array is passed to Objects.hash() it needs to be wrapped with Arrays.hashCode() for calculating the hash of the array content rather than using the array instance "identity hash code"
2024-02-14 09:29:11 +00:00
Simon Cooper
a0c21f853f
Map old release version id directly to their version, don't specify a range (#105335) 2024-02-14 09:24:25 +00:00
David Turner
c0e931af06
Detach persistent task execution from ThreadPool (#105460)
Similar to #99392, #97879 etc, no need to have the
`NodePersistentTasksExecutor` look up the executor to use each time, nor
does it necessarily need to use a named executor from the `ThreadPool`.
This commit pulls the lookup earlier in initialization so we can just
use a bare `Executor` instead.
2024-02-14 08:55:05 +00:00
Mary Gouseti
741c6327ca
[Health Monitoring] Stop the periodic health logger when es is stopping (#105272)
We see errors that we believe this is happening because `es` is already
stopping but the periodic health logger keeps querying the the health
API. Since the `es` stopping we believe it makes sense to also stop the
periodic health logger. 

Furthermore, we make the close method more respectful to the execution
of the periodic health logger which will wait for the last run to finish
if it's still in progress.

This PR makes the `HealthPeriodicLogger` lifecycle aware and uses a
semaphore to block the `close()` method.
2024-02-14 03:09:56 -05:00
Przemysław Witek
a0ed9ba73e
Move MlConfigVersion.getMinMlConfigVersion call under try-catch block (#105391) 2024-02-14 08:11:32 +01:00
Martijn van Groningen
67bf5f3d28
Improve test coverage for index shrinking a tsdb index. (#105459) 2024-02-14 08:10:25 +01:00