Commit graph

85775 commits

Author SHA1 Message Date
Felix Barnsteiner
8fd1afc245
Ingest all documents in a single call to Engine.index
This amortizes the locks in org.apache.lucene.index.DocumentsWriter
2025-04-16 13:24:51 +02:00
Felix Barnsteiner
a50efd9125
Optimize tsid for better compression 2025-04-14 08:30:36 +02:00
Felix Barnsteiner
f2b628ddc0
Fix disk usage stats by properly accounting for multiple values 2025-04-14 08:26:03 +02:00
Felix Barnsteiner
c726c576d8
Add noop mode 2025-04-10 15:22:33 +02:00
Felix Barnsteiner
5c072ab754
Change List.of to Collections.singletonList to avoid red herring in profiles 2025-04-10 12:02:08 +02:00
Felix Barnsteiner
728de305d7
Store separate time series docs in normalize mode 2025-04-09 16:49:31 +02:00
Felix Barnsteiner
cc3cda2fba
Create LuceneDocuments from pmetrics 2025-04-09 10:20:00 +02:00
Oleksandr Kolomiiets
038b59fb8f Use correct threads 2025-04-08 13:11:24 -07:00
Oleksandr Kolomiiets
c127cda31d Index empty lucene documents 2025-04-07 15:23:18 -07:00
Oleksandr Kolomiiets
ed90ec32c5 Introduce transport action and inject stuff into it 2025-04-04 12:41:32 -07:00
Oleksandr Kolomiiets
ee09edf9e9 Reduce logs 2025-04-03 14:50:46 -07:00
Oleksandr Kolomiiets
246708159d Add MetricsRestAction 2025-04-03 14:00:08 -07:00
Ben Chaplin
9f6eb1d4e3
Log stack traces on data nodes before they are cleared for transport (#125732)
We recently cleared stack traces on data nodes before transport back to the coordinating node when error_trace=false to reduce unnecessary data transfer and memory on the coordinating node (#118266). However, all logging of exceptions happens on the coordinating node, so stack traces disappeared from any logs. This change logs stack traces directly on the data node when error_trace=false.
2025-04-03 13:45:09 -04:00
Lorenzo Dematté
e4ce993c16
[Entitlements] Fix PolicyUtils and PolicyUtilsTests on Windows (#126185)
This PR fixes 2 issues discovered around PolicyUtils (and PolicyUtilsTests) when running CI on Windows:
- in tests, absolute paths like always are different, this fix updates the tests to account for the difference.
- on Windows, Files.move was failing because we were parsing the Entitlement policy but not closing the stream in a timely manner. This causes plugin installation (and related CI tests) to fail 70% of the time. Fixed by closing the stream properly

Fixes #126176
2025-04-03 18:02:17 +01:00
David Turner
279498d810
Remove spurious NOMERGE comment (#126231)
Left-over from #122062
2025-04-04 03:46:07 +11:00
Mary Gouseti
488951edf3
Data stream lifecycle does not record error in failure store rollover (#126229)
**Issue** The data stream lifecycle does not register correctly rollover
errors for failure store.

**Observed bahaviour** When data stream lifecycle encounters a rollover
error it records it unless it sees that the current write index of this
data stream doesn't match the source index of the request. However, the
write index check does not use the failure write index but the write
backing index, so the failure gets ignored

**Desired behaviour** When data stream lifecycle encounters a rollover
error it will check the relevant write index before it determines if it
should be recorded or not.
2025-04-04 03:44:09 +11:00
Armin Braun
d9bc3b97eb
Flip batched execution flag to false for test (#126228)
Disabling this to illustrate a point in nightly ccs runs.
2025-04-03 17:25:16 +01:00
elasticsearchmachine
fcfc90ee1f Mute org.elasticsearch.packaging.test.DockerTests test020PluginsListWithNoPlugins #126232 2025-04-04 02:44:43 +11:00
Ievgen Degtiarenko
1c7867d53b
Presize sets (#126098) 2025-04-03 17:37:43 +02:00
Ioana Tagirta
bd0a75df8b
Make Fork n-ary (#126074) 2025-04-03 17:09:26 +02:00
Slobodan Adamović
3affea35bd
[Failure Store] Add missing feature flag check in RBACEngineTests (#126215)
Resolves https://github.com/elastic/elasticsearch/issues/126130
2025-04-04 02:08:13 +11:00
Omri Cohen
856ee3a177
Support explicit Z/M attributes using WKT geometry (#125896) 2025-04-03 17:00:12 +02:00
kanoshiou
30b2a1f729
ESQL: Enhanced DATE_TRUNC with arbitrary intervals (#120302)
Originally, `DATE_TRUNC` only supported 1-month and 3-month intervals for months, and 1-year interval for years, while arbitrary intervals were supported for weeks and days. This PR adds support for `DATE_TRUNC` with arbitrary month and year intervals. 

Closes #120094
2025-04-03 16:55:56 +02:00
elasticsearchmachine
44a74f9fec Mute org.elasticsearch.xpack.security.SecurityRolesMultiProjectIT testUpdatingFileBasedRoleAffectsAllProjects #126223 2025-04-04 01:15:31 +11:00
elasticsearchmachine
7807183972 Mute org.elasticsearch.entitlement.runtime.policy.PolicyUtilsTests testFormatFilesEntitlement #126176 2025-04-04 01:03:43 +11:00
Pat Whelan
69180eafe1
[ML] Refactor SSE Parsing (#125959)
ServerSentEvent is now a record with `event` and `data`, rather than
it being a record for value with a separate `ServerSentEventField`.

- `value` was renamed to `data`
- `hasValue` was renamed to `hasData`
- Parsing was refactored to read more like its spec: writing to a buffer
  and flushing when we reach a blank newline
- We now support multiline data payloads
2025-04-03 09:42:49 -04:00
elasticsearchmachine
3277ff8b28 Mute org.elasticsearch.index.engine.ThreadPoolMergeSchedulerTests testSchedulerCloseWaitsForRunningMerge #125236 2025-04-04 00:31:29 +11:00
David Turner
69f9914403
Migrate tests away from S3 SDK MD5DigestCalculatingInputStream (#126099)
`S3BlobContainerRetriesTests` uses `MD5DigestCalculatingInputStream`
from the AWS v1 SDK to compute a MD5 checksum, but this feature is not
available in the v2 SDK. With this commit we remove this dependency and
compute the MD5 checksums directly instead.
2025-04-03 14:11:00 +01:00
elasticsearchmachine
d5c0778f70 Mute org.elasticsearch.snapshots.SharedClusterSnapshotRestoreIT testDeletionOfFailingToRecoverIndexShouldStopRestore #126204 2025-04-03 22:40:38 +11:00
Richard Dennehy
f821930518
Fix NPE for missing Content Type header in OIDC Authenticator (#126191)
* Fix NPE for missing Content Type header in OIDC Authenticator

* Update docs/changelog/126191.yaml
2025-04-03 12:38:53 +01:00
Mary Gouseti
95257bbf07
Make data stream options multi-project aware (#126141) 2025-04-03 14:33:40 +03:00
Przemysław Witek
062d580899
Verify usage of CATEGORIZE function in the ES|QL telemetry tests (#126105) 2025-04-03 13:19:49 +02:00
Albert Zaharovits
0faa960aa2
Fix IndexStatsIT (#126113)
Ensures proper cleanup in the testThrottleStats test.

Fixes #125910 #125907 #125912
2025-04-03 14:09:38 +03:00
Craig Taverner
1645711ff8
Unmute already fixed test (#126194)
This was fixed last week in
https://github.com/elastic/elasticsearch/pull/125802. It seems this
report was from the day before the fix, but the PR was based on main
without the mute, so a timing issue. I'll make a PR that simply unmutes
the test.

Fixes #125735
2025-04-03 22:07:39 +11:00
Martijn van Groningen
717d00d96d
Fix TsdbDocValueBwcTests test failure. (#126182)
Don't perform version check assertion in TsdbDocValueBwcTests if security manager is active.

By default, with jvm version 24 entitlements are used instead security manager and assertOldDocValuesFormatVersion() / assertNewDocValuesFormatVersion() work as expected.

Making these methods work with security manager would require granting the server entire test codebase suppressAccessChecks and suppressAccessChecks privileges. This is undesired from a security manager perspective. Instead, only assert doc values format checks if security manager isn't active, which is always the case jvm version 24 or higher is used.

Closes #126174
2025-04-03 12:19:59 +02:00
Albert Zaharovits
ecaa0b1f65
Fix ThreadPoolMergeSchedulerTests testSchedulerCloseWaitsForRunningMerge (#126110)
Fixes #125236
2025-04-03 11:11:55 +03:00
Ievgen Degtiarenko
0095f29624
Remove TableInfo (#126090) 2025-04-03 09:42:32 +02:00
Alexander Spies
28a544e0c5
ESQL: Fix ReplaceMissingFieldsWithNull (#125764)
* Revert changes to Layout.java

The change in 80125a4bac is a quick fix
and allows breaking an invariant of Layout. Revert that.

* Simplify ReplaceMissingFieldWithNull

When encountering projections, it tries to do the job of field
extraction for missing fields by injecting an Eval that creates a
literal null with the same name id as the field attribute for the
missing field. This is wrong:
1. We only insert an Eval in case that a Project relies on the missing
   attribute. There could be other plan nodes that rely on the missing
   attribute.
2. Even for Projects, we only insert an Eval in case we squarely project
   for the field - in case of aliases (e.g. from RENAME), we do nothing.
3. In case of multiple Projects that use this attribute, we create
   multiple attributes with the original field attribute's id, causing
   a wrong Layout. This triggered
   https://github.com/elastic/elasticsearch/issues/121754.

* Revive logic for EsRelation instead of Project

* Update LocalLogicalPlanOptimizerTests

* Update docs/changelog/125764.yaml

* Update test expectations

* Do not prune attributes from EsRelation

This can lead to empty output, which leads to the EsRelation being
replaced by a LocalRelation with 0 rows.

* Add tests + capability

* Update docs/changelog/125764.yaml

* Add comments
2025-04-03 09:26:26 +02:00
David Turner
9b353f69a7
Fix CommonPrefixes rendering in S3HttpHandler (#126147)
Today the `ListObjects` implementation in `S3HttpHandler` will put all
the common prefixes in a single `<CommonPrefixes>` container, but in
fact the real S3 gives each one its own container. The v1 SDK is lenient
and accepts either, but the v2 SDK requires us to do this correctly.
This commit fixes the test fixture to match the behaviour of the real
S3.
2025-04-03 07:55:07 +01:00
Nhat Nguyen
b563145129
Rename METRICS command to TS (#126064)
- Rename METRICS to TS
- Disable time-series tests in mixed clusters until the development stabilizes.
2025-04-02 16:16:46 -07:00
Joe Gallo
552066e910
Revert "Bump spotless (#126125)" (#126173)
Reverting https://github.com/elastic/elasticsearch/pull/126125 due to
https://github.com/elastic/elasticsearch/pull/126125#issuecomment-2773672346.
2025-04-03 09:00:33 +11:00
Bogdan Pintea
2b512bc58a
ESQL: make AttributeMap and AttributeSet immutable (#125938)
This will allow reusing them in the plan analysis and skip recreating them in UnaryPlan/UnaryExec when not needed.
Introduce/adjust builders for them, which are now the only way to use a modifiable map/set.

Related #124395
2025-04-02 23:27:12 +02:00
elasticsearchmachine
8a44b382b8 Merge patch/serverless-fix into main 2025-04-02 21:00:39 +00:00
Benjamin Trent
33dcc921be
Mark rescore_vector as generally available (#126038)
* Mark rescore_vector as generally available

* Update docs/changelog/126038.yaml
2025-04-02 16:10:01 -04:00
Pawan Kartik
c54c3afb42
Add transport version entry for backport (#126168) 2025-04-02 20:40:34 +01:00
Oleksandr Kolomiiets
daed78308c
Fix KeywordFieldBlockLoaderTests (#126146) 2025-04-02 11:59:22 -07:00
Albert Zaharovits
01a1f454e1
Unmute ThreadContextTests testDropWarningsExceedingMaxSettings (#123629) 2025-04-02 21:10:29 +03:00
Ioana Tagirta
47edd0adb8
Remove SEMANTIC_TEXT data type in ES|QL (#125581) 2025-04-02 19:47:28 +02:00
Stanislav Malyshev
d84b65d38b
Ensure the set of remote clusters is consistent over the life of ES|QL query (#126000)
* Ensure the set of remote clusters is consistent over the life of ES|QL query
2025-04-02 11:46:04 -06:00
Niels Bauman
483f97915c
Run TransportGetIndexAction on local node (#125652)
This action solely needs the cluster state, it can run on any node.
Since this is the last class/action that extends the `ClusterInfo`
abstract classes, we remove those classes too as they're not required
anymore.

Relates #101805
2025-04-02 18:41:35 +01:00