Commit graph

80771 commits

Author SHA1 Message Date
elastic-renovate-prod[bot]
23fb957e21
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to 6387bd4 (#123386)
This PR contains the following updates:

| Package | Update | Change | |---|---|---| |
docker.elastic.co/wolfi/chainguard-base | digest | `d74b1fd` ->
`6387bd4` |

---

### Configuration

📅 **Schedule**: Branch creation - "after 1pm on tuesday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once
you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoiOC4xNiIsImxhYmVscyI6WyI6RGVsaXZlcnkvUGFja2FnaW5nIiwiPm5vbi1pc3N1ZSIsIlRlYW06RGVsaXZlcnkiLCJhdXRvLW1lcmdlLXdpdGhvdXQtYXBwcm92YWwiXX0=-->
2025-02-27 20:13:43 +11:00
Nik Everett
3263429a78
ESQL: Speed up VALUES for many buckets (#123073) (#123229)
* ESQL: Speed up VALUES for many buckets (#123073)

Speeds up the VALUES agg when collecting from many buckets.
Specifically, this speeds up the algorithm used to `finish` the
aggregation. Most specifically, this makes the algorithm more tollerant
to large numbers of groups being collected. The old algorithm was
`O(n^2)` with the number of groups. The new one is `O(n)`

```
(groups)
      1     219.683 ±    1.069  ->   223.477 ±    1.990 ms/op
   1000     426.323 ±   75.963  ->   463.670 ±    7.275 ms/op
 100000   36690.871 ± 4656.350  ->  7800.332 ± 2775.869 ms/op
 200000   89422.113 ± 2972.606  -> 21920.288 ± 3427.962 ms/op
 400000 timed out at 10 minutes -> 40051.524 ± 2011.706 ms/op
```

The `1` group version was not changed at all. That's just noise in the
measurement. The small bump in the `1000` case is almost certainly worth
it and real. The huge drop in the `100000` case is quite real.

* Fix

* Compile
2025-02-27 07:35:57 +11:00
Ioana Tagirta
e40319c7a0
Remove references to doc types in percolator docs (#123508) (#123529) 2025-02-27 03:26:57 +11:00
Rene Groeschke
cf7ccb19c4
[Gradle] Fix build finished hooks on ci when using configuration cache (#116888) (#122740)
Fixes two incompatibilities with Gradle configuration cache in our build scan build finished hook:

referencing static methods from build script
referencing gradle object from closure

(cherry picked from commit 929d39820a)
2025-02-26 13:12:01 +01:00
Nikolaj Volgushev
ae2d918938
[8.16] Upgrade Netty to 4.1.118.Final (#122371) (#123481)
* Upgrade Netty to `4.1.118.Final` (#122371)

This PR upgrades Netty to `4.1.118.Final`.

* Bring back old netty versions for hdfs test fixture
2025-02-26 23:01:58 +11:00
Niels Bauman
c8c16d0566
[8.16] Fix failing test(s) in TimeSeriesDataStreamsIT (#123378) (#123475)
* Fix failing test(s) in `TimeSeriesDataStreamsIT` (#123378)

When these tests were run around midnight, the use of
`DataStream#getDefaultBackingIndexName` could result in a potential
mismatch in the generated index name and the one that the cluster
actually created. Instead, we need to obtain the backing index and
extract the desired index name from there.

Fixes #123086
Relates #123376

(cherry picked from commit f0f0eeb077)

# Conflicts:
#	x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java

* Fix compilation
2025-02-26 22:49:14 +11:00
David Turner
19402e2c68
Reduce licence checks in LicensedWriteLoadForecaster (#123369) (#123408)
Rather than checking the license (updating the usage map) on every
single shard, just do it once at the start of a computation that needs
to forecast write loads.

Backport of #123346 to 8.x
Closes #123247
2025-02-26 06:59:14 +11:00
Rene Groeschke
b45ee0b3c7
Move eclipse specific extention property into elasticsearch eclipse plugin (#123320) (#123344) 2025-02-25 20:44:19 +11:00
Joe Gallo
b8f8723e6c
Register IngestGeoIpMetadata as a NamedXContent (#123079) (#123329) 2025-02-25 12:53:21 +11:00
elasticsearchmachine
a45569c981 Mute org.elasticsearch.gradle.internal.InternalDistributionBwcSetupPluginFuncTest builds distribution from branches via archives extractedAssemble [bwcDistVersion: 8.4.0, bwcProject: minor, expectedAssembleTaskName: extractedAssemble, #0] #123219 2025-02-25 04:34:03 +11:00
elasticsearchmachine
6af16455b9 Mute org.elasticsearch.gradle.internal.InternalBwcGitPluginFuncTest current repository can be cloned #123297 2025-02-25 04:33:57 +11:00
Nik Everett
e12d7775e7
ESQL: Add known issue for slow VALUES (#123222)
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-02-24 16:41:09 +00:00
David Turner
cc3c3870ec
Deduplicate allocation stats calls (#123267) (#123280)
These things can be quite expensive and there's no need to recompute
them in parallel across all management threads as done today. This
commit adds a deduplicator to avoid redundant work.

Backport of #123246 to `8.x`
2025-02-25 03:33:42 +11:00
Oleksandr Kolomiiets
9cc75734d0
fix stale data in synthetic source for string stored field (#123105) (#123277)
Co-authored-by: jeffganmr <106223805+jeffganmr@users.noreply.github.com>
2025-02-25 03:26:32 +11:00
Brian Seeders
4a226131e4
Update .backportrc.json 2025-02-19 13:12:06 -05:00
Johannes Fredén
33f973ba70
[8.16] Bump json-smart and oauth2-oidc-sdk (#122737) (#122915)
* Bump json-smart and oauth2-oidc-sdk (#122737)

* Bump json-smart and oauth2-oidc-sdk

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
(cherry picked from commit e16664573e)

# Conflicts:
#	gradle/verification-metadata.xml

* fixup! Add back verification data for test dep
2025-02-19 09:54:53 +01:00
Felix Barnsteiner
bfd77c9485
Add _metric_names_hash field to OTel metric mappings (#120952) (#122881)
If metrics that have the same timestamp and dimensions aren't grouped into the same document, ES will consider them to be a duplicate.
The _metric_names_hash field will be set by the OTel ES exporter.
As it's mapped as a time_series_dimensions, it creates a different _tsid for documents with different sets of metrics.
The tradeoff is that if the composition of the metrics grouping changes over time, a different _tsid will be created.
That has an impact on the rate aggregation for counters.
2025-02-19 05:40:06 +11:00
Mike Pellegrini
4d408d4591
[8.16] Fix ArrayIndexOutOfBoundsException in ShardBulkInferenceActionFilter (#122538) (#122854)
* Fix ArrayIndexOutOfBoundsException in ShardBulkInferenceActionFilter (#122538)

(cherry picked from commit 229d392e63)

# Conflicts:
#	x-pack/plugin/inference/src/internalClusterTest/java/org/elasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterIT.java

* Fix compilation & test failures
2025-02-19 02:26:23 +11:00
Sam Xiao
74f10d2cd5
Unmute DateProcessorTests::testJavaPatternDefaultYear (#122577) 2025-02-18 23:12:55 +08:00
elastic-renovate-prod[bot]
5d71ff6888
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to d74b1fd (#122841)
This PR contains the following updates:

| Package | Update | Change | |---|---|---| |
docker.elastic.co/wolfi/chainguard-base | digest | `bd40170` ->
`d74b1fd` |

---

### Configuration

📅 **Schedule**: Branch creation - "after 1pm on tuesday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once
you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoiOC4xNiIsImxhYmVscyI6WyI6RGVsaXZlcnkvUGFja2FnaW5nIiwiPm5vbi1pc3N1ZSIsIlRlYW06RGVsaXZlcnkiLCJhdXRvLW1lcmdlLXdpdGhvdXQtYXBwcm92YWwiXX0=-->
2025-02-19 01:13:11 +11:00
Joe Gallo
a55e76936c
Fix redact processor arraycopy bug (#122640) (#122767) 2025-02-18 03:21:45 +11:00
Johannes Fredén
4f9c33f546
Improve jwt logging on failed auth (#122247) (#122784)
Update docs/changelog/122247.yaml
2025-02-18 03:18:57 +11:00
Yang Wang
244fd4c700
[Test] Flush master queue before checking snapshots (#116938) (#122721)
The block-on-data-node returns once the data node begins to process the
cluster state update for new snapshot. This is before master can see the
chnages. In edge cases, the listener may be completed too early before
the master can see the new snapshot. This PR flushes the master queue to
ensure the snapshot is visible.

Resolves: #116730
(cherry picked from commit 5d9385f1ca)

# Conflicts:
#	muted-tests.yml
2025-02-17 16:16:15 +11:00
Joe Gallo
4b338f88ae
Canonicalize processor names and types in IngestStats (#122610) (#122633) 2025-02-15 05:38:06 +11:00
elastic-renovate-prod[bot]
f6cc4d757c
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to bd40170 (#121031)
This PR contains the following updates:

| Package | Update | Change | |---|---|---| |
docker.elastic.co/wolfi/chainguard-base | digest | `bfdeddb` ->
`bd40170` |

---

### Configuration

📅 **Schedule**: Branch creation - "after 1pm on tuesday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once
you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoiOC4xNiIsImxhYmVscyI6WyI6RGVsaXZlcnkvUGFja2FnaW5nIiwiPm5vbi1pc3N1ZSIsIlRlYW06RGVsaXZlcnkiLCJhdXRvLW1lcmdlLXdpdGhvdXQtYXBwcm92YWwiXX0=-->
2025-02-15 04:47:01 +11:00
elasticsearchmachine
859c25b798 Bump versions after 8.16.4 release 2025-02-14 16:17:39 +00:00
Ignacio Vera
963f2556e9
Deduplicate IngestStats and IngestStats.Stats identity records when deserializing (#122496) (#122516)
This commit makes sure we reuse the existing static instance when deserializing to avoid excessive heap usage.
# Conflicts:
#	server/src/main/java/org/elasticsearch/ingest/IngestStats.java
2025-02-13 18:36:56 +01:00
Mark Vieira
d9ef61f806
Add release tooling for adding new transport versions (#122426) (#122450) 2025-02-13 07:23:14 -08:00
Rene Groeschke
effce74800
Develocity setup does not allow overwriting server url (#122470) (#122478)
This is a prerequisite to have
https://github.com/elastic/elasticsearch/pull/122296 passing in bwc
tests
2025-02-13 10:49:19 +01:00
Rene Groeschke
020afb97b1
[Build] Fix the manifest target and source information for jdbc projects (#121888) (#122240)
The nebula info broker plugin takes the information for the manifest from the java project settings rather then from
the compile task configuration. Instead of setting the compiler task configuration explicitly we now set the project
configuration accordingly. Also tweaked the javaTestCompile tasks to keep compiling with general minimum runtime version as we did before

(cherry picked from commit 6e6e42f5d4)
2025-02-12 09:13:11 +01:00
elasticsearchmachine
c0da9daf91 Prune changelogs after 8.16.4 release 2025-02-11 20:19:19 +00:00
elasticsearchmachine
26834792bc Bump versions after 8.16.4 release 2025-02-11 20:18:32 +00:00
Brian Seeders
75192e3bf9
Update .backportrc.json 2025-02-11 14:00:25 -05:00
elasticsearchmachine
8350b129ee Finalize release notes for v8.16.4 2025-02-12 06:00:19 +11:00
Luigi Dell'Aquila
622c3c924d
EQL: fix JOIN command validation (not supported) (#122011) (#122172) 2025-02-11 01:23:37 +11:00
elasticsearchmachine
17baef4d53
Update docs for v8.16.4 release (#122106) 2025-02-10 11:33:56 +01:00
Nik Everett
f70771f1db
Retry timeout tests for aggs (#122031) (#122082)
The aggs timeout test waits for the agg to return and then double checks
that the agg is stopped using the tasks API. We're seeing some failures
where the tasks API reports that the agg is still running. I can't
reproduce them because computers. This adds two things:
1. Logs the hot_threads so we can see if the query is indeed still
   running.
2. Retries the _tasks API for a minute. If it goes away soon after the
   _search returns that's *fine*. If it sticks around for more than a
   few seconds then the cancel isn't working. We wait for a minute
   because CI can't be trusted to do anything quickly.

Closes #121993
2025-02-08 07:05:16 +11:00
Luigi Dell'Aquila
e1176cdfce
ES|QL: fix ENRICH validation for use of wildcards (#121911) (#122020) 2025-02-07 23:46:35 +11:00
Brian Seeders
3a298fc723
[CI] Remove Windows 2016 testing (#121941) (#121958)
(cherry picked from commit b952809838)
2025-02-06 16:39:18 -05:00
Mark Vieira
a87fb8d386
Upgrade mockito (#121849) (#121932) 2025-02-06 12:23:57 -08:00
Mark Tozzi
cf36d97a32
Aggregations cancellation after collection (#120944) (#121936)
This PR addresses issues around aggregations cancellation, mentioned in https://github.com/elastic/elasticsearch/issues/108701 and other places. In brief, during aggregations collection time, we respect cancellation via the mechanisms in the searcher to poison cancelled queries. But once the aggregation finishes collection, there is no further need to interact with the searcher, so we cannot rely on that for cancellation checking. In particular, deeply nested aggregations can spend a long time constructing the results tree.

Checking for cancellation is a trade off, as the check itself is somewhat expensive (it involves a volatile read), so we want to balance checking often enough that cancelled queries aren't taking up resources for a long time, but not so frequently that it slows down most aggregation queries. Our first attempt to this is to check once when we go to build sub-aggregations, as the worst cases for this that we've seen involve needing to build deep sub-aggregation trees. Checking at sub-aggregation construction time also provides a conveniently centralized method call to add the check to.

---------



 Conflicts:
	server/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java
	test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-02-07 06:51:21 +11:00
Andrei Stefan
bb77d4979e
ESQL: use field_caps native nested fields filtering (#121918)
* [8.x] ESQL: use field_caps native nested fields filtering (#117201) (#117375) (#121645)

* Just filter the nested fields natively with field_caps support

(cherry picked from commit 73381dbeb1)

* Add import
2025-02-06 19:39:53 +02:00
Mark Vieira
2f9f364ae2
Fix thirdPartyAudit task when running on Java 24 (#121712) (#121840)
We need to explicitly add the incubating vector API module to the third
party audit task on Java 24.

(cherry picked from commit 0c667ecd2a)

# Conflicts:
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ThirdPartyAuditTask.java
2025-02-06 07:04:46 -08:00
Mark Vieira
0b865d477e
Don't attempt to install modules into test cluster more than once (#121833) (#121863)
(cherry picked from commit 56cac1bfe9)
2025-02-06 11:56:51 +11:00
Oleksandr Kolomiiets
28635f09d8
[8.16] Fix synthetic source issue with deeply nested ignored source fields (#121715) (#121790)
* Fix synthetic source issue with deeply nested ignored source fields (#121715)

* Fix synthetic source issue with deeply nested ignored source fields

* Update docs/changelog/121715.yaml

* fix tests
2025-02-06 07:13:24 +11:00
Christoph Büscher
a57a79269b
[8.16] Fix rare failures in YAML xContent roundtrip tests (#121515) (#121684)
Under very unfortunate conditions tests that check xContent objects
roundtrip parsing  (like i.e. SearchHitsTests#testFromXContent)
can fail when we happen to randomly pick YAML xContent type and create
random (realistic)Unicode character sequences that may contain the
character U+0085 (133) from the Latin1 code page. That specific character
doesn't get parsed back to its original form for YAML xContent, which can 
lead to rare but hard to diagnose test failures.

This change adds logic to AbstractXContentTestCase#test() which lies at
the core of most of our  xContent roundtrip tests that disallows test
instances containing that particular character  when using YAML xContent
type.

Closes #97716
2025-02-05 16:12:17 +01:00
Joe Gallo
24c39085ca
Update geolocation database documentation (#121472) (#121671) 2025-02-05 02:22:49 +11:00
Carson Ip
0396027494
Add missing apm-server tail sampling monitoring metrics to stack monitoring mapping (#121543) (#121579)
Add missing apm-server tail sampling monitoring metrics to stack monitoring mapping. They were missed in #110568.

(cherry picked from commit f3f5135f06)

# Conflicts:
#	x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringTemplateRegistry.java
2025-02-04 22:35:16 +11:00
Luigi Dell'Aquila
ad192c5456
[8.16] Fix docs.testFilterToday JDBC test (#121504) (#121635)
* Unmute

* Fix docs.testFilterToday JDBC test (#121504)
2025-02-04 19:46:46 +11:00
elasticsearchmachine
2142631e72 Mute org.elasticsearch.xpack.sql.qa.single_node.JdbcDocCsvSpecIT test {docs.testFilterToday} #121474 2025-02-04 16:56:37 +11:00