Skip to content

Commit 1f14955

Browse files
authored
Merge branch 'main' into cleanup_data_node_request_sender
2 parents e10b7b1 + 1f68bfb commit 1f14955

File tree

57 files changed

+3369
-3028
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+3369
-3028
lines changed

benchmarks/src/main/java/org/elasticsearch/benchmark/routing/allocation/AllocationBenchmark.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
import org.elasticsearch.cluster.ClusterState;
1515
import org.elasticsearch.cluster.metadata.IndexMetadata;
1616
import org.elasticsearch.cluster.metadata.Metadata;
17+
import org.elasticsearch.cluster.metadata.ProjectId;
18+
import org.elasticsearch.cluster.metadata.ProjectMetadata;
1719
import org.elasticsearch.cluster.node.DiscoveryNodes;
20+
import org.elasticsearch.cluster.routing.GlobalRoutingTable;
1821
import org.elasticsearch.cluster.routing.RoutingTable;
1922
import org.elasticsearch.cluster.routing.ShardRouting;
2023
import org.elasticsearch.cluster.routing.allocation.AllocationService;
@@ -126,19 +129,20 @@ public void setUp() throws Exception {
126129
Settings.builder().put("cluster.routing.allocation.awareness.attributes", "tag").build()
127130
);
128131

129-
Metadata.Builder mb = Metadata.builder();
132+
final ProjectId projectId = ProjectId.DEFAULT;
133+
ProjectMetadata.Builder pmb = ProjectMetadata.builder(projectId);
130134
for (int i = 1; i <= numIndices; i++) {
131-
mb.put(
135+
pmb.put(
132136
IndexMetadata.builder("test_" + i)
133137
.settings(Settings.builder().put(IndexMetadata.SETTING_VERSION_CREATED, IndexVersion.current()))
134138
.numberOfShards(numShards)
135139
.numberOfReplicas(numReplicas)
136140
);
137141
}
138-
Metadata metadata = mb.build();
142+
Metadata metadata = Metadata.builder().put(pmb).build();
139143
RoutingTable.Builder rb = RoutingTable.builder(TestShardRoutingRoleStrategies.DEFAULT_ROLE_ONLY);
140144
for (int i = 1; i <= numIndices; i++) {
141-
rb.addAsNew(metadata.getProject().index("test_" + i));
145+
rb.addAsNew(metadata.getProject(projectId).index("test_" + i));
142146
}
143147
RoutingTable routingTable = rb.build();
144148
DiscoveryNodes.Builder nb = DiscoveryNodes.builder();
@@ -151,7 +155,7 @@ public void setUp() throws Exception {
151155
}
152156
initialClusterState = ClusterState.builder(ClusterName.DEFAULT)
153157
.metadata(metadata)
154-
.routingTable(routingTable)
158+
.routingTable(GlobalRoutingTable.builder().put(projectId, routingTable).build())
155159
.nodes(nb)
156160
.nodeIdsToCompatibilityVersions(compatibilityVersions)
157161
.build();

docs/changelog/126273.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 126273
2+
summary: Fix LTR rescorer with model alias
3+
area: Ranking
4+
type: bug
5+
issues: []

docs/changelog/126319.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 126319
2+
summary: COMPLETION command grammar and logical plan
3+
area: ES|QL
4+
type: feature
5+
issues: []

docs/internal/DistributedArchitectureGuide.md

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,50 +22,6 @@ See the [Javadocs for `ActionListener`](https://github.com/elastic/elasticsearch
2222

2323
(TODO: add useful starter references and explanations for a range of Listener classes. Reference the Netty section.)
2424

25-
### REST Layer
26-
27-
The REST and Transport layers are bound together through the `ActionModule`. `ActionModule#initRestHandlers` registers all the
28-
rest actions with a `RestController` that matches incoming requests to particular REST actions. `RestController#registerHandler`
29-
uses each `Rest*Action`'s `#routes()` implementation to match HTTP requests to that particular `Rest*Action`. Typically, REST
30-
actions follow the class naming convention `Rest*Action`, which makes them easier to find, but not always; the `#routes()`
31-
definition can also be helpful in finding a REST action. `RestController#dispatchRequest` eventually calls `#handleRequest` on a
32-
`RestHandler` implementation. `RestHandler` is the base class for `BaseRestHandler`, which most `Rest*Action` instances extend to
33-
implement a particular REST action.
34-
35-
`BaseRestHandler#handleRequest` calls into `BaseRestHandler#prepareRequest`, which children `Rest*Action` classes extend to
36-
define the behavior for a particular action. `RestController#dispatchRequest` passes a `RestChannel` to the `Rest*Action` via
37-
`RestHandler#handleRequest`: `Rest*Action#prepareRequest` implementations return a `RestChannelConsumer` defining how to execute
38-
the action and reply on the channel (usually in the form of completing an ActionListener wrapper). `Rest*Action#prepareRequest`
39-
implementations are responsible for parsing the incoming request, and verifying that the structure of the request is valid.
40-
`BaseRestHandler#handleRequest` will then check that all the request parameters have been consumed: unexpected request parameters
41-
result in an error.
42-
43-
### How REST Actions Connect to Transport Actions
44-
45-
The Rest layer uses an implementation of `AbstractClient`. `BaseRestHandler#prepareRequest` takes a `NodeClient`: this client
46-
knows how to connect to a specified TransportAction. A `Rest*Action` implementation will return a `RestChannelConsumer` that
47-
most often invokes a call into a method on the `NodeClient` to pass through to the TransportAction. Along the way from
48-
`BaseRestHandler#prepareRequest` through the `AbstractClient` and `NodeClient` code, `NodeClient#executeLocally` is called: this
49-
method calls into `TaskManager#registerAndExecute`, registering the operation with the `TaskManager` so it can be found in Task
50-
API requests, before moving on to execute the specified TransportAction.
51-
52-
`NodeClient` has a `NodeClient#actions` map from `ActionType` to `TransportAction`. `ActionModule#setupActions` registers all the
53-
core TransportActions, as well as those defined in any plugins that are being used: plugins can override `Plugin#getActions()` to
54-
define additional TransportActions. Note that not all TransportActions will be mapped back to a REST action: many TransportActions
55-
are only used for internode operations/communications.
56-
57-
### Transport Layer
58-
59-
(Managed by the TransportService, TransportActions must be registered there, too)
60-
61-
(Executing a TransportAction (either locally via NodeClient or remotely via TransportService) is where most of the authorization & other security logic runs)
62-
63-
(What actions, and why, are registered in TransportService but not NodeClient?)
64-
65-
### Direct Node to Node Transport Layer
66-
67-
(TransportService maps incoming requests to TransportActions)
68-
6925
### Chunk Encoding
7026

7127
#### XContent

docs/internal/GeneralArchitectureGuide.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,50 @@
11
# General Architecture
22

3-
## Transport Actions
3+
# REST and Transport Layers
4+
5+
### REST Layer
6+
7+
The REST and Transport layers are bound together through the `ActionModule`. `ActionModule#initRestHandlers` registers all the
8+
rest actions with a `RestController` that matches incoming requests to particular REST actions. `RestController#registerHandler`
9+
uses each `Rest*Action`'s `#routes()` implementation to match HTTP requests to that particular `Rest*Action`. Typically, REST
10+
actions follow the class naming convention `Rest*Action`, which makes them easier to find, but not always; the `#routes()`
11+
definition can also be helpful in finding a REST action. `RestController#dispatchRequest` eventually calls `#handleRequest` on a
12+
`RestHandler` implementation. `RestHandler` is the base class for `BaseRestHandler`, which most `Rest*Action` instances extend to
13+
implement a particular REST action.
14+
15+
`BaseRestHandler#handleRequest` calls into `BaseRestHandler#prepareRequest`, which children `Rest*Action` classes extend to
16+
define the behavior for a particular action. `RestController#dispatchRequest` passes a `RestChannel` to the `Rest*Action` via
17+
`RestHandler#handleRequest`: `Rest*Action#prepareRequest` implementations return a `RestChannelConsumer` defining how to execute
18+
the action and reply on the channel (usually in the form of completing an ActionListener wrapper). `Rest*Action#prepareRequest`
19+
implementations are responsible for parsing the incoming request, and verifying that the structure of the request is valid.
20+
`BaseRestHandler#handleRequest` will then check that all the request parameters have been consumed: unexpected request parameters
21+
result in an error.
22+
23+
### How REST Actions Connect to Transport Actions
24+
25+
The Rest layer uses an implementation of `AbstractClient`. `BaseRestHandler#prepareRequest` takes a `NodeClient`: this client
26+
knows how to connect to a specified TransportAction. A `Rest*Action` implementation will return a `RestChannelConsumer` that
27+
most often invokes a call into a method on the `NodeClient` to pass through to the TransportAction. Along the way from
28+
`BaseRestHandler#prepareRequest` through the `AbstractClient` and `NodeClient` code, `NodeClient#executeLocally` is called: this
29+
method calls into `TaskManager#registerAndExecute`, registering the operation with the `TaskManager` so it can be found in Task
30+
API requests, before moving on to execute the specified TransportAction.
31+
32+
`NodeClient` has a `NodeClient#actions` map from `ActionType` to `TransportAction`. `ActionModule#setupActions` registers all the
33+
core TransportActions, as well as those defined in any plugins that are being used: plugins can override `Plugin#getActions()` to
34+
define additional TransportActions. Note that not all TransportActions will be mapped back to a REST action: many TransportActions
35+
are only used for internode operations/communications.
36+
37+
### Transport Layer
38+
39+
(Managed by the TransportService, TransportActions must be registered there, too)
40+
41+
(Executing a TransportAction (either locally via NodeClient or remotely via TransportService) is where most of the authorization & other security logic runs)
42+
43+
(What actions, and why, are registered in TransportService but not NodeClient?)
44+
45+
### Direct Node to Node Transport Layer
46+
47+
(TransportService maps incoming requests to TransportActions)
448

549
## Serializations
650

docs/reference/elasticsearch/mapping-reference/keyword.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The following parameters are accepted by `keyword` fields:
7070
: Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one field for search and a multi-field for sorting and aggregations.
7171

7272
[`ignore_above`](/reference/elasticsearch/mapping-reference/ignore-above.md)
73-
: Do not index any string longer than this value. Defaults to `2147483647` so that all values would be accepted. Please however note that default dynamic mapping rules create a sub `keyword` field that overrides this default by setting `ignore_above: 256`.
73+
: Do not index any string longer than this value. Defaults to `2147483647` in standard indices so that all values would be accepted, and `8191` in logsdb indices to protect against Lucene's term byte-length limit of `32766`. Please however note that default dynamic mapping rules create a sub `keyword` field that overrides this default by setting `ignore_above: 256`.
7474

7575
[`index`](/reference/elasticsearch/mapping-reference/mapping-index.md)
7676
: Should the field be quickly searchable? Accepts `true` (default) and `false`. `keyword` fields that only have [`doc_values`](/reference/elasticsearch/mapping-reference/doc-values.md) enabled can still be queried, albeit slower.
@@ -376,7 +376,7 @@ The following parameters are accepted by `wildcard` fields:
376376
: Accepts a string value which is substituted for any explicit `null` values. Defaults to `null`, which means the field is treated as missing.
377377

378378
[`ignore_above`](/reference/elasticsearch/mapping-reference/ignore-above.md)
379-
: Do not index any string longer than this value. Defaults to `2147483647` so that all values would be accepted.
379+
: Do not index any string longer than this value. Defaults to `2147483647` in standard indices so that all values would be accepted, and `8191` in logsdb indices to protect against Lucene's term byte-length limit of `32766`.
380380

381381

382382
### Limitations [_limitations]

docs/reference/query-languages/esql/functions-operators/grouping-functions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ The [`STATS`](/reference/query-languages/esql/commands/processing-commands.md#es
1616
:::{include} ../_snippets/functions/layout/bucket.md
1717
:::
1818

19+
:::{note}
20+
The `CATEGORIZE` function requires a [platinum license](https://www.elastic.co/subscriptions).
21+
:::
22+
1923
:::{include} ../_snippets/functions/layout/categorize.md
2024
:::
2125

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,12 +423,6 @@ tests:
423423
- class: org.elasticsearch.index.shard.IndexShardTests
424424
method: testReentrantEngineReadLockAcquisitionInRefreshListener
425425
issue: https://github.com/elastic/elasticsearch/issues/126628
426-
- class: org.elasticsearch.upgrades.SearchStatesIT
427-
method: testBWCSearchStates
428-
issue: https://github.com/elastic/elasticsearch/issues/126632
429-
- class: org.elasticsearch.upgrades.SearchStatesIT
430-
method: testCanMatch
431-
issue: https://github.com/elastic/elasticsearch/issues/126633
432426
- class: org.elasticsearch.xpack.esql.action.EsqlActionIT
433427
method: testQueryOnEmptyDataIndex
434428
issue: https://github.com/elastic/elasticsearch/issues/126580
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"inference.inference": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html",
5+
"description": "Perform inference"
6+
},
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": ["application/json"],
11+
"content_type": ["application/json"]
12+
},
13+
"url": {
14+
"paths": [
15+
{
16+
"path": "/_inference/{inference_id}",
17+
"methods": ["POST"],
18+
"parts": {
19+
"inference_id": {
20+
"type": "string",
21+
"description": "The inference Id"
22+
}
23+
}
24+
},
25+
{
26+
"path": "/_inference/{task_type}/{inference_id}",
27+
"methods": ["POST"],
28+
"parts": {
29+
"task_type": {
30+
"type": "string",
31+
"description": "The task type"
32+
},
33+
"inference_id": {
34+
"type": "string",
35+
"description": "The inference Id"
36+
}
37+
}
38+
}
39+
]
40+
},
41+
"body": {
42+
"description": "The inference payload"
43+
}
44+
}
45+
}

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ static TransportVersion def(int id) {
158158
public static final TransportVersion RERANK_COMMON_OPTIONS_ADDED_8_19 = def(8_841_0_15);
159159
public static final TransportVersion REMOTE_EXCEPTION_8_19 = def(8_841_0_16);
160160
public static final TransportVersion AMAZON_BEDROCK_TASK_SETTINGS_8_19 = def(8_841_0_17);
161+
public static final TransportVersion BATCHED_QUERY_PHASE_VERSION_BACKPORT_8_X = def(8_841_0_19);
161162
public static final TransportVersion INITIAL_ELASTICSEARCH_9_0 = def(9_000_0_00);
162163
public static final TransportVersion REMOVE_SNAPSHOT_FAILURES_90 = def(9_000_0_01);
163164
public static final TransportVersion TRANSPORT_STATS_HANDLING_TIME_REQUIRED_90 = def(9_000_0_02);

0 commit comments

Comments
 (0)