Commit graph

76812 commits

Author SHA1 Message Date
Tim Rühsen
2afe7cacee
Fix NPEs in CO2Calculator.getKiloWattsPerCore() (#110024) (#110308)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-07-01 19:30:01 +10:00
Tim Grein
d37e8c0c9a
Fix typo in get-inference docs (retrives -> retrieves) (#110320) (#110324) 2024-07-01 10:49:32 +02:00
Nhat Nguyen
b817cfadd0
Tolerate floating point precision in multi node tests (#110238) (#110283)
Some assertions with floating-point values are failing on serverless 
because we run tests with three shards with serverless. This can cause
variations in precision because data may arrive in different orders. For
example, sum([a, b, c]) can yield a different precision than sum([a, c,
b]). This change introduces tolerance for precision differences beyond
e-10, which should be acceptable for ESQL.
2024-06-29 02:22:43 +10:00
George Wallace
7aecf65c6c
Update behavioral-analytics-start.asciidoc (#110271) (#110276) 2024-06-29 01:25:18 +10:00
Luigi Dell'Aquila
2f10f4fc94
[backport] Fix ClassCastException with MV_EXPAND on missing field (#110096) (#110264) 2024-06-28 23:33:06 +10:00
Oleksandr Kolomiiets
6253c58e58
Remove obsolete sentence from TSDS docs (#110162) (#110198) 2024-06-26 08:54:23 -07:00
István Zoltán Szabó
e08e77c447
[DOCS] Adds link to ES-Cohere notebook and clarifies requirements. (#110195) (#110199) 2024-06-27 01:46:48 +10:00
Kostas Krikellas
6f91e0f7d1
Remove average from downsampling statistics in documentation (#110189) (#110193) 2024-06-27 00:47:11 +10:00
Benjamin Trent
d3efd51bc1
Fix automatic tracking of collapse with docvalue_fields (#110103) (#110154)
There were some optimizations that broke collapse fields automatically
being added to `docvalue_fields` during the fetch phase. 

Consequently, users will get really weird errors like
`unsupported_operation_exception`. This commit corrects the intended
behavior of automatically including the collapse field in the
docvalue_fields context during fetch if it isn't already included.

closes: https://github.com/elastic/elasticsearch/issues/96510
2024-06-26 07:55:11 -04:00
Yang Wang
25b5660fd0 [Test] Unmute S3RepositoryThirdPartyTests.testCreateSnapshot
The test failed due to infrastructure issue which seems to disappears
based on the success runs on the main branch.

Relates: #110093
2024-06-26 15:43:29 +10:00
Benjamin Trent
1d4a9f0360
Add some docs explaining filter performance and behavior for HNSW (#110108) (#110145) 2024-06-25 23:09:49 +10:00
Martijn van Groningen
8290743fe3
Remove obsolete information about tsdb dimensions limit. (#110047) (#110127) 2024-06-25 20:04:46 +10:00
Martijn van Groningen
5ed3afde11
Add a note about enabling time series index mode via a component template (#110050) (#110120)
Closes #109149
2024-06-25 17:45:32 +10:00
Liam Thompson
207c371393
[DOCS] Update semantic-text.asciidoc on 8.14 branch (#110104) 2024-06-24 19:35:54 +02:00
Ignacio Vera
6894d16712
Do not cache SingleValueQuery.LuceneQuery (#110082) (#110091)
If the query gets cached, then it won't be able to emit warnings for multivalue fields.
2024-06-24 23:50:50 +10:00
David Kyle
5348ba2fc6 AwaitsFix: https://github.com/elastic/elasticsearch/issues/110093 2024-06-24 14:22:03 +01:00
Rene Groeschke
de54e06e4a
[8.14] Update Gradle wrapper to 8.8 (#108021) (#109345)
(cherry picked from commit 8ac3e3dd90)

* Add asm 9.7 to verification metadata
2024-06-24 13:15:03 +02:00
Mayya Sharipova
8865227a90
[DOCS Vectors with cosine automatically normalized (#110071) (#110074)
PR #99445 introduced automatic normalization of dense vectors with
cosine similarity. This adds a note about this in the documentation.

Relates to #99445
2024-06-22 22:55:41 +10:00
Colleen McGinnis
1b6dcf6c04
fix tab widgets in semantic search with the inference API tutorial (#110064) 2024-06-22 08:45:56 +02:00
shainaraskas
a1ca593704
(Doc+) Delineate Bootstrapping Data Stream from Alias (#107976) (#110068)
* (Doc+) Delineate Bootstrapping Data Stream from Alias

👋 howdy, team!

This is follow-up to [elasticsearch#107327](https://github.com/elastic/elasticsearch/pull/107327). I realized my mistake was that we had duplicate sentences in different sections so I edited the wrong area. However, it seemed like a good opportunity to consider clarifying the page better by fixing header links so that the sub-sections reflect as sub-headers instead of all being equal. Thoughts?

* Apply suggestions from code review

Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>

---------

Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
(cherry picked from commit a3f3f59399)

Co-authored-by: Stef Nestor <26751266+stefnestor@users.noreply.github.com>
2024-06-22 08:48:33 +10:00
shainaraskas
f719f8b02f
(Doc+) Capture Elasticsearch diagnostic (#108259) (#110067)
* (Doc+) Capture Elasticsearch diagnostic

* add diagnostic topic to nav, chunk content, style edits

* fix test

---------

Co-authored-by: shainaraskas <shaina.raskas@elastic.co>
(cherry picked from commit 1a55e2fa76)

Co-authored-by: Stef Nestor <26751266+stefnestor@users.noreply.github.com>
2024-06-22 08:43:06 +10:00
Ignacio Vera
28722d5a1c
Fix equals and hashcode for SingleValueQuery.LuceneQuery (#110035) (#110048)
Fixes the implementation of equals and hashcode so the lucene queries can be cached.
2024-06-22 01:16:50 +10:00
Rene Groeschke
98bfeab21c
Remove cross project support in TestFixturesPlugin (#109077) (#109081)
- One step closer to configuration cache support
- Crossproject support has been replaced by using testcontainer based fixtures
2024-06-21 23:14:12 +10:00
Mary Gouseti
978557ab65
[Bug] During heavy indexing load it's possible for lazy rollover to trigger multiple rollovers (#109636) (#110031)
Let’s say we have `my-metrics`  data stream which is receiving a lot of
indexing requests. The following scenario can result in multiple
unnecessary rollovers:

1. We update the mapping and mark it to be lazy rolled over
2. We receive 5 bulk index requests that all contain a write request for this data stream.
3. Each of these requests are being picked up “at the same time”, they see that the data stream needs to be rolled over and they issue a lazy rollover request.
4. Currently, data stream my-metrics  has 5 tasks executing an unconditional rollover.
5. The data stream gets rolled over 5 times instead of one.

This scenario is captured in the `LazyRolloverDuringDisruptionIT`.

We have witnessed this also in the wild, where a data stream was rolled
over 281 times extra resulting in 281 empty indices.

This PR proposes:

- To create a new task queue with a more efficient executor that further batches/deduplicates the requests.
- We add two safe guards, the first to ensure we will not enqueue the rollover task if we see that a rollover has occurred already. The second safe guard is during task execution, if we see that the data stream does not have the `rolloverOnWrite` flag set to `true` we skip the rollover.
- When we skip the rollover we return the following response:

```
{
  "acknowledged": true,
  "shards_acknowledged": true,
  "old_index": ".ds-my-data-stream-2099.05.07-000002",
  "new_index": ".ds-my-data-stream-2099.05.07-000002",
  "rolled_over": false,
  "dry_run": false,
  "lazy": false,
}
```
2024-06-21 15:09:08 +03:00
Craig Taverner
863f0cee32 AwaitsFix: https://github.com/elastic/elasticsearch/issues/110034 2024-06-21 13:47:18 +02:00
David Kyle
90866e073a
[ML] Unmute multiple tests that failed parsing unknown field (#109947)
This reverts commit 7e6018b328.
This reverts commit 21f6bbbf83.
2024-06-21 09:26:04 +01:00
Artem Prigoda
cc36b7f346
[8.14] Fix TasksIT#testGetTaskWaitForCompletionWithoutStoringResult (#108094) (#110012)
Backport #108094 to 8.14

Resolves #106043
2024-06-21 07:16:00 +10:00
Brian Seeders
36ca4c15c5
[ci] Bump disk size for agents to 250GB (#109975) (#109976) 2024-06-20 10:44:21 -04:00
David Turner
342a4517dc
[8.14] Fix TasksIT#testTasksCancellation (#109929) (#109941)
* Fix `TasksIT#testTasksCancellation` (#109929)

The tasks are removed from the task manager _after_ sending the
response, so we cannot reliably assert they're done. With this commit we
wait for them to complete properly first.

Closes #109686

* Introduce safeGet
2024-06-20 03:56:46 +10:00
David Turner
b1fadd8d92 AwaitsFix: https://github.com/elastic/elasticsearch/issues/109806 2024-06-19 17:53:33 +01:00
Liam Thompson
e30c4c89b7
Fix Bulk Helpers link of Python (#108694) (#109938)
Co-authored-by: Hasanul Islam <hasanuli10@gmail.com>
2024-06-20 02:18:32 +10:00
Panagiotis Bailis
65ec438730
[8.14] backporting fix for RRF pagination (#109788) 2024-06-19 18:40:35 +03:00
David Turner
da1ba774be AwaitsFix for #109686 2024-06-19 14:56:54 +01:00
David Kyle
d2acaa817e
[ML] Swallow the model size stats allocation bytes field (#109847)
Anomaly detection will write the `output_memory_allocator_bytes` field in the 
model size stats but that field is not used in 8.14
2024-06-19 10:53:52 +01:00
Yang Wang
eb34c5812e AwaitsFix: https://github.com/elastic/elasticsearch/issues/109902 2024-06-19 18:14:09 +10:00
Yang Wang
15dcf74b2f AwaitsFix: https://github.com/elastic/elasticsearch/issues/109904 2024-06-19 16:05:07 +10:00
Yang Wang
7e6018b328 AwaitsFix: https://github.com/elastic/elasticsearch/issues/109902 2024-06-19 16:02:17 +10:00
Yang Wang
21f6bbbf83 AwaitsFix: https://github.com/elastic/elasticsearch/issues/109903 2024-06-19 16:00:05 +10:00
Yang Wang
5126e62fb4 [Test] Unmute PackageTests.test60Reinstall
Should be fixed by #109891
2024-06-19 12:06:44 +10:00
Yang Wang
997f513a32 AwaitsFix: https://github.com/elastic/elasticsearch/issues/109897 2024-06-19 09:38:04 +10:00
Mark Vieira
c6798306c9
Adjust packaging test exit code assertion (#109879) (#109891)
# Conflicts:
#	muted-tests.yml
2024-06-19 08:02:07 +10:00
Nik Everett
98d7195f6a
[8.14] ESQL: Warn about division (#109716) (#109772)
* ESQL: Warn about division (#109716)

When you divide two integers or two longs we round towards 0. Like
Postgres or Java or Rust or C. Other systems, like MySQL or SPL or
Javascript or Python always produce a floating point number. We should
warn folks about this. It's genuinely unexpected for some folks. OTOH,
converting into a floating point number would be unexpected for other
folks. Oh well, let's document what we've got.

* Fix link for 8.14
2024-06-18 21:16:39 +10:00
Luca Cavanna
06172d7e00
Check array size before returning array item in script doc values (#109824) (#109840)
When accessing array elements from a script, if the backing array has enough items, meaning that
there has previously been a doc with enough values, we let the request go through, and we end up
returning items from the previous doc that had a value at that position if the current doc does not
have enough elements.

We should instead validate the length of the array for the current doc and eventually throw an error
if the index goes over the available number of values.

Closes #104998
2024-06-18 11:00:40 +02:00
Ievgen Degtiarenko
d1d7db2c9c AwaitsFix: https://github.com/elastic/elasticsearch/issues/109841 2024-06-18 10:55:42 +02:00
David Turner
4a0fc736f7 Revert "[ML] Handle the "output memory allocator bytes" field (#109653) (#109833)"
This reverts commit 44200c7743.
2024-06-18 08:35:06 +01:00
Ed Savage
44200c7743
[ML] Handle the "output memory allocator bytes" field (#109653) (#109833)
Handle the "output memory allocator bytes" field if and only if it is present in the model size stats, as reported by the C++ backend.

This PR must be merged prior to the corresponding ml-cpp one, to keep CI tests happy.

Backports #109653
2024-06-18 16:34:54 +12:00
Mary Gouseti
b98fbeb5df
Downsampling test fix: reorder policy and index creation. (#109787) (#109791)
This PR fixes two test failures
https://github.com/elastic/elasticsearch/issues/103981 &
https://github.com/elastic/elasticsearch/issues/105437 and refactors the
code a bit to make things more explicit.

**What was the issue** These tests were creating an index with a policy
before that policy was created. This could cause an issue if ILM would
run after the index was created but before the policy was created. 

When ILM runs before the policy is added, the following happen:

-  the index encounters an error the ILM state sets that the current step is `null`, which makes sense since there is no policy to retrieve a step from. 
- A `null` step does not qualify to be executed periodically, which also makes sense because probably nothing changed, so chances are the index will remain in this state.
- The test keeps waiting for something to happen, but this is not happening because no cluster state updates are coming like they would have if this was a "real" cluster. 
- Until the test tear down starts, then the index gets updates with the ILM policy but it's a bit too late.

The previous scenario is confirmed by the logging too.

```
----> The index gets created referring a policy that does not exist yet, ILM runs at least twice before the policy is there
[2024-06-12T20:14:28,857][....] [index-sanohmhwxl] creating index, ......
[2024-06-12T20:14:28,870][....] [index-sanohmhwxl] retrieved current step key: null
[2024-06-12T20:14:28,871][....] unable to retrieve policy [policy-tohpA] for index [index-sanohmhwxl], recording this in step_info for this index java.lang.IllegalArgumentException: policy [policy-tohpA] does not exist

-----> Only now the policy is added
[2024-06-12T20:14:29,024][....] adding index lifecycle policy [policy-tohpA]

-----> ILM is running periodically but because the current step is null it ignores it
[2024-06-12T20:15:23,791][....] job triggered: ilm, 1718223323790, 1718223323790
[2024-06-12T20:15:23,791][....] retrieved current step key: null
[2024-06-12T20:15:23,791][....] maybe running periodic step (InitializePolicyContextStep) with current step {"phase":"new","action":"init","name":"init"}
```

This can also be locally reproduced by adding a 5s thread sleep before
adding the policy. 

**The fix** Adding a non existing policy to an index is a not a
supported path. For this reason, we refactored the test to reflect a
more realistic scenario. 

- We add the policy as an argument in `private void createIndex(String index, String alias, String policy, boolean isTimeSeries)`. This way it's clear that a policy could be added.
- We created the policy before adding the index, it does not appear that adding the policy later is crucial for the test, so simplifying it sounded like a good idea.
- Simplified `testRollupIndexInTheHotPhaseWithoutRollover` that ensures that a downsampling action cannot be added in the hot phase without rollover. An index is not necessary for this test, so again simplifying it makes the purpose of the test more clear.

Fixes: https://github.com/elastic/elasticsearch/issues/103981 Fixes:
https://github.com/elastic/elasticsearch/issues/105437
2024-06-17 18:52:45 +10:00
David Turner
5c80ed3b33 Revert "(+Doc) link split-brain wiki from quorom decision making (#108915) (#108925)"
This reverts commit 076dd99456.
2024-06-16 08:55:09 +01:00
Nhat Nguyen
8c1b168fd5
Fix ESQL cancellation for exchange requests (#109695) (#109712)
Currently, we do not register task cancellations for exchange requests, 
which leads to a long delay in failing the main request when a data-node 
request is rejected.
2024-06-14 08:13:04 +10:00
shainaraskas
efbece50f4
[DOCS] Address local vs. remote storage + shard limits feedback (#109360) (#109688)
(cherry picked from commit 900eb82c99)
2024-06-13 15:08:13 -04:00