Commit graph

79853 commits

Author SHA1 Message Date
Tim Brooks
c5caf84e2d
Move raw path into HttpPreRequest (#113231)
Currently, the raw path is only available from the RestRequest. This
makes the logic to determine if a handler supports streaming more
challenging to evaluate. This commit moves the raw path into pre request
to allow easier streaming support logic.
2024-09-21 05:32:45 +10:00
Oleksandr Kolomiiets
b9855b8e4e
Correctly identify parent of copy_to destination field for synthetic source purposes (#113153) 2024-09-20 12:08:55 -07:00
elasticsearchmachine
079b4c355d Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT #113298 2024-09-21 04:06:27 +10:00
elasticsearchmachine
417f308528 Mute org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT test {stats.DocsStatsGroupByMultipleValues} #113296 2024-09-21 03:13:07 +10:00
elasticsearchmachine
d34ec20463 Mute org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT test {date.DocsDateFormat} #113295 2024-09-21 03:12:57 +10:00
elasticsearchmachine
36874b0da6 Mute org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT test {date.EvalDateFormat} #113294 2024-09-21 03:12:46 +10:00
elasticsearchmachine
af896313df Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {date.EvalDateFormatString SYNC} #113293 2024-09-21 03:12:33 +10:00
Patrick Doyle
67e32e5c82
Initial trivial hello-world entitlements agent (#113112)
* Initial hello-world entitlements agent

* Respond to Ryan's comments

* License header

* Fix forbidden APIs setup

* Rename EntitlementAgent

* Automated refactor missed one

* Automated rename really let me down here

* Very serious test name

* README files for the new modules

* Use "tasks.named('jar')"

Co-authored-by: Rene Groeschke <rene@breskeby.com>

* Use 'tasks.named('test')'

Co-authored-by: Rene Groeschke <rene@breskeby.com>

* More deferral of gradle tasks

Co-authored-by: Rene Groeschke <rene@breskeby.com>

* Even more deferral

Co-authored-by: Rene Groeschke <rene@breskeby.com>

* FIx gradle syntax for javaagent arg

---------

Co-authored-by: Rene Groeschke <rene@breskeby.com>
2024-09-20 13:12:27 -04:00
David Turner
01cb679858
Make CreateDataStreamClusterStateUpdateRequest a record (#113282)
No need to extend `ClusterStateUpdateRequest` here.
2024-09-21 02:45:34 +10:00
Oleksandr Kolomiiets
5a1577137e
Apply workaround for known issue to logsdb test data generation (#113214) 2024-09-20 09:42:57 -07:00
David Turner
33a73a8111
Trigger merges after recovery (#113102)
We may have shut a shard down while merges were still pending (or
adjusted the merge policy while the shard was down) meaning that after
recovery its segments do not reflect the desired state according to the
merge policy. With this commit we invoke `IndexWriter#maybeMerge()` at
the end of recovery to check for, and execute, any such lost merges.
2024-09-20 17:16:03 +01:00
elasticsearchmachine
634d0e7883 Mute org.elasticsearch.xpack.security.authz.SecurityScrollTests testSearchAndClearScroll #113285 2024-09-21 01:41:45 +10:00
Pm Ching
d68f2fa4a6
fix a couple of docs typos (#112901) 2024-09-20 18:34:24 +03:00
Drew Tate
aa71954ccb
[ES|QL] Use describe method to generate OrdinalGroupingOperator profile message (#113150)
* Use describe method to generate aggregators string

* Improve message

* remove incorrect query change
2024-09-20 10:14:22 -05:00
Ryan Ernst
2ecfb397ad
Remove plugin classloader indirection (#113154)
Extensible plugins use a custom classloader for other plugin jars. When
extensible plugins were first added, the transport client still existed,
and elasticsearch plugins did not exist in the transport client (at
least not the ones that create classloaders). Yet the transport client
still created a PluginsService. An indirection was used to avoid
creating separate classloaders when the transport client had created the
PluginsService.

The transport client was removed in 8.0, but the indirection still
exists. This commit removes that indirection layer.
2024-09-20 07:45:40 -07:00
Nhat Nguyen
b977a337e3
Add test for source-only snapshot with synthetic source (#113233)
Source-only snapshots do not support indices that do not retain the 
original source, including indices with synthetic sources. This change
adds a YAML test to verify this behavior.

Closes #112735
2024-09-20 07:14:11 -07:00
Ryan Ernst
77bf9740f7
Add test for dense transport versions (#113213)
Now that 8.x is branched from main, all transport version changes must be
backported until 9.0 is ready to diverge. This commit adds a test which
ensures transport versions are densely packed, ie there are no gaps at
the granularity the version id is bumped (multiples of 1000).
2024-09-20 06:56:36 -07:00
elasticsearchmachine
92279056f4 Mute org.elasticsearch.datastreams.logsdb.qa.StandardVersusLogsIndexModeRandomDataChallengeRestIT testMatchAllQuery #113265 2024-09-20 22:39:46 +10:00
elasticsearchmachine
109abdc65e Mute org.elasticsearch.integration.KibanaUserRoleIntegTests testGetMappings #113260 2024-09-20 21:38:32 +10:00
David Turner
6ff138f558
Drop useless AckedRequest interface (#113255)
Almost every implementation of `AckedRequest` is an
`AcknowledgedRequest` too, and the distinction is rather confusing.
Moreover the other implementations of `AckedRequest` are a potential
source of `null` timeouts that we'd like to get rid of. This commit
simplifies the situation by dropping the unnecessary `AckedRequest`
interface entirely.
2024-09-20 12:33:07 +01:00
Luigi Dell'Aquila
5530caa94d
Fix tests with warnings due to date format changes in JDK 23 (#113253)
Adding warnings like

```
Date format [MMMM] contains textual field specifiers that could change in JDK 23
```

to failing tests, due to changes recently introduced about Locale
Provider

Fixes: #113226 Fixes: #113227 Fixes: #113198 Fixes: #113199 Fixes:
#113200
2024-09-20 21:19:27 +10:00
Bogdan Pintea
f7ff00f645
ESQL: Align year diffing to the rest of the units in DATE_DIFF: chronological (#113103)
This will correct/switch "year" unit diffing from the current integer
subtraction to a crono subtraction. Consequently, two dates are (at
least) one year apart now if (at least) a full calendar year separates
them. The previous implementation simply subtracted the year part of the
dates.

Note: this parts with ES SQL's implementation of the same function,
which itself is aligned with MS SQL's implementation, which works
equivalent to an integer subtraction.

Fixes #112482.
2024-09-20 20:21:29 +10:00
Armin Braun
8a179ff69e
Speedup RecyclerBytesStreamOutput.writeString (#113241)
This method is quite hot in some use-cases because it's used by
most string writing to transport messages. Overriding teh default
implementation for cases where we can write straight to the
page instead of going through an intermediary buffer speeds up
the method by more than 2x, saving lots of cycles, especially
on transport threads.
2024-09-20 11:50:36 +02:00
Armin Braun
8a94037421
Fix unnecessary context switch in RankFeaturePhase (#113232)
If we don't actually execute this phase we shouldn't fork the phase
unnecessarily. We can compute the RankFeaturePhaseRankCoordinatorContext
on the transport thread and move on to fetch without forking.
Fetch itself will then fork and we can run the reduce as part of fetch instead of in
a separte search pool task (this is the way it worked up until the recent introduction
of RankFeaturePhase, this fixes that regression).
2024-09-20 11:38:05 +02:00
Sachin Frayne
b00129abbb
adds missing indexing_pressure monitoring fields to mb template (#113175) 2024-09-20 11:36:54 +02:00
István Zoltán Szabó
9b7d808bf4
[DOCS] Fixes adaptive_allocations examples (#113248)
Co-authored-by: Jan Kuipers <148754765+jan-elastic@users.noreply.github.com>
2024-09-20 11:31:04 +02:00
elasticsearchmachine
1b2b202ef7 Mute org.elasticsearch.datastreams.logsdb.qa.StandardVersusLogsIndexModeRandomDataChallengeRestIT testTermsQuery #113246 2024-09-20 18:36:56 +10:00
Alexander Spies
2e1fccf07c
ESQL Docs: Mention Discover/Field Statistics in OOM known issue in 8.15.1/2 (#113196) 2024-09-20 18:31:53 +10:00
Pius
3b854a6bee
Update 8.15.1.asciidoc (#113221) 2024-09-20 10:02:00 +02:00
Luca Cavanna
ae7cd5e008
Replace MappedFieldType#extractTerm with local query visitor (#113163)
The only usage of `MappedFieldType#extractTerm` comes from `SpanTermQueryBuilder`
which attempts to extract a single term from a generic Query obtained from calling
`MappedFieldType#termQuery`. We can move this logic directly within its only caller,
and instead of using instanceof checks, we can rely on the query visitor API.

This additionally allows us to remove one of the leftover usages of TermInSetQuery#getTermData
which is deprecated in Lucene
2024-09-20 09:55:36 +02:00
Mary Gouseti
f4f075a2cc
Add failure store status in index response of data streams (#112816)
The failure store status is a flag that indicates how the failure store was used or could be used if enabled. The user can be informed about the usage of the failure store in the following way:

When relevant we add the optional field `failure_store` . The field will be omitted when the use of the failure store is not relevant. For example, if a document was successfully indexed in a data stream, if a failure concerns an index or if the opType is not index or create. In more detail:
- when we have a “success” create/index response, the field `failure_store` will not be present if the documented was indexed in a backing index. Otherwise, if it got stored in the failure store it will have the value `used`.
- when we have a “rejected“ create/index response, meaning the document was not persisted in elasticsearch, we return the field `failure_store` which is either `not_enabled`, if the document could have ended up in the failure store if it was enabled, or `failed` if something went wrong and the document was not persisted in the failure store, for example, the cluster is out of space and in read-only mode.

We chose to make it an optional field to reduce the impact of this field on a bulk response. The value will exist in the java object but it will not be returned to the user. The only values that will be displayed are:

- `used`: meaning this document was indexed in the failure store
- `not_enabled`: meaning this document was rejected but could have been stored in the failure store if it was applicable.
- `failed`: meaning this failed document, failed to be stored in the failure store.

Example:
```
"errors": true,
  "took": 202,
  "items": [
    {
      "create": {
        "_index": ".fs-my-ds-2024.09.04-000002",
        "_id": "iRDDvJEB_J3Inuia2zgH",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 6,
        "_primary_term": 1,
        "status": 201,
        "failure_store": "used"
      }
    },
    {
      "create": {
        "_index": "ds-no-fs",
        "_id": "hxDDvJEB_J3Inuia2jj3",
        "status": 400,
        "error": {
          "type": "document_parsing_exception",
          "reason": "[1:153] failed to parse field [count] of type [long] in document with id 'hxDDvJEB_J3Inuia2jj3'. Preview of field's value: 'bla'",
          "caused_by": {
            "type": "illegal_argument_exception",
            "reason": "For input string: \"bla\""
          }
        }
      },
      "failure_store": "not_enabled"
    },
    {
      "create": {
        "_index": ".ds-my-ds-2024.09.04-000001",
        "_id": "iBDDvJEB_J3Inuia2jj3",
        "_version": 1,
        "result": "created",
        "_shards": {
          "total": 2,
          "successful": 1,
          "failed": 0
        },
        "_seq_no": 7,
        "_primary_term": 1,
        "status": 201
      }
    }
  ]
```
2024-09-20 10:53:39 +03:00
Armin Braun
49183d6d3a
Some improvements to ES812PostingsReader (#107354)
Removing some fields that need not exist from this class as well as
cleaning up two redundant conditions and adding missing `final`.
2024-09-20 09:30:26 +02:00
Andrei Stefan
2cccf1380b
ES|QL: Skip CASE function from InferIsNotNull rule checks (#113123)
* Skip CASE function from InferIsNotNull rule checks
2024-09-20 10:20:14 +03:00
elasticsearchmachine
7c65ad5177 Mute org.elasticsearch.index.mapper.DoubleRangeFieldMapperTests testSyntheticSourceKeepAll #113234 2024-09-20 14:26:04 +10:00
Mikhail Berezovskiy
cbe7ea0718
Unmute channel when flush last http stream chunk (#113222) 2024-09-19 15:48:13 -07:00
Keith Massey
ec50aaa835
Making transport changes to enable component template substitutions in the simulate ingest API (#113063) 2024-09-19 17:42:51 -05:00
elasticsearchmachine
88a94c9a18 Mute org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT test {p0=search/180_locale_dependent_mapping/Test Index and Search locale dependent mappings / dates} #113227 2024-09-20 07:23:44 +10:00
elasticsearchmachine
48e91f7698 Mute org.elasticsearch.xpack.esql.qa.mixed.EsqlClientYamlIT test {p0=esql/70_locale/Date format with default locale} #113226 2024-09-20 07:23:34 +10:00
elasticsearchmachine
4b8671b07d Mute org.elasticsearch.xpack.esql.expression.function.aggregate.AvgTests testFold {TestCase=<double> #2} #113225 2024-09-20 07:21:16 +10:00
elasticsearchmachine
5c9cefe82c Mute org.elasticsearch.index.mapper.FloatRangeFieldMapperTests testSyntheticSourceKeepArrays #113220 2024-09-20 06:43:44 +10:00
elasticsearchmachine
b216de5578 Mute org.elasticsearch.packaging.test.WindowsServiceTests test80JavaOptsInEnvVar #113219 2024-09-20 06:43:18 +10:00
elasticsearchmachine
65bddb221a Mute org.elasticsearch.index.mapper.DoubleRangeFieldMapperTests testSyntheticSourceKeepArrays #113217 2024-09-20 06:27:20 +10:00
Ryan Ernst
0dfc5f7859
Remove JNA from native access (#112977)
Now that main has a minimum compile version of Java 21, native access no
longer needs JNA. This commit removes JNA as a dependency, and moves the
jdk implementation into the main source set. It also slightly adjusts
the Mrjar plugin so that the main source set also supports preview
features, like the other numbered source sets.
2024-09-19 12:40:08 -07:00
Lee Hinman
4f221bb4c6
Mark data streams stats API as internal-only (again) (#112712)
This is a redo of https://github.com/elastic/elasticsearch/pull/108745 which was reverted. Now that https://github.com/elastic/elasticsearch/pull/112303 has been merged, there is an alternative to retrieve the `maximum_timestamp`.
2024-09-19 13:24:02 -06:00
elasticsearchmachine
00e81de021 Mute org.elasticsearch.smoketest.MlWithSecurityIT test {yaml=ml/sparse_vector_search/Test sparse_vector search with query vector and pruning config} #108997 2024-09-20 04:12:49 +10:00
Rene Groeschke
3aa84159fc
Update Gradle wrapper to 8.10.1 (#112948) 2024-09-19 19:23:42 +02:00
elasticsearchmachine
2938b4cddf Mute org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT test {categorize.Categorize ASYNC} #113055 2024-09-20 03:08:31 +10:00
elasticsearchmachine
d0446d22a8 Mute org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT test {categorize.Categorize SYNC} #113054 2024-09-20 03:08:17 +10:00
elasticsearchmachine
7fc0a41083 Mute org.elasticsearch.xpack.core.security.authz.RoleDescriptorTests testHasPrivilegesOtherThanIndex #113202 2024-09-20 02:44:50 +10:00
David Turner
33a366a256
Add extra context to TransportNodesAction invocations (#113140)
Several `TransportNodesAction` implementations do some kind of top-level
computation in addition to fanning out requests to individual nodes.
Today they all have to do this once the node-level fanout is complete,
but in most cases the top-level computation can happen in parallel with
the fanout. This commit adds support for an additional `ActionContext`
object, created when starting to process the request and exposed to
`newResponseAsync()` at the end, to allow this parallelization.

All implementations use `(Void) null` for this param, except for
`TransportClusterStatsAction` which now parallelizes the computation of
the cluster-state-based stats with the node-level fanout.
2024-09-19 17:33:38 +01:00