Skip to content

Commit 9d4987e

Browse files
🤖 ESQL: Merge upstream (#179)
🤖 Generated PR to keep ESQL development branch up to date
1 parent d869c90 commit 9d4987e

File tree

120 files changed

+2825
-1514
lines changed

Some content is hidden

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

120 files changed

+2825
-1514
lines changed

TESTING.asciidoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,15 @@ run it using Gradle:
4646
==== Launching and debugging from an IDE
4747

4848
If you want to run Elasticsearch from your IDE, the `./gradlew run` task
49-
supports a remote debugging option:
49+
supports a remote debugging option. Run the following from your terminal:
5050

5151
---------------------------------------------------------------------------
5252
./gradlew run --debug-jvm
5353
---------------------------------------------------------------------------
5454

55-
This will instruct all JVMs (including any that run cli tools such as creating the keyring or adding users)
56-
to suspend and initiate a debug connection on port incrementing from `5005`.
55+
Next start the "Debug Elasticsearch" run configuration in IntelliJ. This will enable the IDE to connect to the process and allow debug functionality.
56+
57+
5758
As such the IDE needs to be instructed to listen for connections on this port.
5859
Since we might run multiple JVMs as part of configuring and starting the cluster it's
5960
recommended to configure the IDE to initiate multiple listening attempts. In case of IntelliJ, this option

distribution/docker/src/docker/bin/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ fi
8181

8282
# Signal forwarding and child reaping is handled by `tini`, which is the
8383
# actual entrypoint of the container
84-
exec /usr/share/elasticsearch/bin/elasticsearch "$@" $POSITIONAL_PARAMETERS <<<"$KEYSTORE_PASSWORD"
84+
exec /usr/share/elasticsearch/bin/elasticsearch $POSITIONAL_PARAMETERS <<<"$KEYSTORE_PASSWORD"

docs/changelog/88211.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 88211
2+
summary: Add 'mode' option to `_source` field mapper
3+
area: Search
4+
type: feature
5+
issues: []

docs/changelog/88445.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 88445
2+
summary: Add issuer to GET _ssl/certificates
3+
area: TLS
4+
type: enhancement
5+
issues: []

docs/changelog/88450.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 88450
2+
summary: Add new `cache_size` parameter to `trained_model` deployments API
3+
area: Machine Learning
4+
type: enhancement
5+
issues: []

docs/changelog/88479.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 88479
2+
summary: Deduplicate mappings in persisted cluster state
3+
area: Cluster Coordination
4+
type: enhancement
5+
issues: []

docs/changelog/88502.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/changelog/88586.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 88586
2+
summary: Disable URL connection caching in SPIClassIterator
3+
area: Infra/Plugins
4+
type: bug
5+
issues:
6+
- 88275

docs/reference/mapping/fields/synthetic-source.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
Though very handy to have around, the source field takes up a significant amount
55
of space on disk. Instead of storing source documents on disk exactly as you
66
send them, Elasticsearch can reconstruct source content on the fly upon retrieval.
7-
Enable this by setting `synthetic: true` in `_source`:
7+
Enable this by setting `mode: synthetic` in `_source`:
88

99
[source,console,id=enable-synthetic-source-example]
1010
----
1111
PUT idx
1212
{
1313
"mappings": {
1414
"_source": {
15-
"synthetic": true
15+
"mode": "synthetic"
1616
}
1717
}
1818
}

docs/reference/mapping/types/boolean.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Synthetic source always sorts `boolean` fields. For example:
228228
PUT idx
229229
{
230230
"mappings": {
231-
"_source": { "synthetic": true },
231+
"_source": { "mode": "synthetic" },
232232
"properties": {
233233
"bool": { "type": "boolean" }
234234
}

docs/reference/mapping/types/geo-point.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ ifeval::["{release-state}"=="unreleased"]
208208
[[geo-point-synthetic-source]]
209209
==== Synthetic source
210210
`geo_point` fields support <<synthetic-source,synthetic `_source`>> in their
211-
default configuration. Synthetic `_source` cannot be used together with
211+
default configuration. Synthetic `_source` cannot be used together with
212212
<<ignore-malformed,`ignore_malformed`>>, <<copy-to,`copy_to`>>, or with
213213
<<doc-values,`doc_values`>> disabled.
214214

@@ -219,7 +219,7 @@ longitude) and reduces them to their stored precision. For example:
219219
PUT idx
220220
{
221221
"mappings": {
222-
"_source": { "synthetic": true },
222+
"_source": { "mode": "synthetic" },
223223
"properties": {
224224
"point": { "type": "geo_point" }
225225
}

docs/reference/mapping/types/ip.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Synthetic source always sorts `ip` fields and removes duplicates. For example:
165165
PUT idx
166166
{
167167
"mappings": {
168-
"_source": { "synthetic": true },
168+
"_source": { "mode": "synthetic" },
169169
"properties": {
170170
"ip": { "type": "ip" }
171171
}

docs/reference/mapping/types/keyword.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ example:
189189
PUT idx
190190
{
191191
"mappings": {
192-
"_source": { "synthetic": true },
192+
"_source": { "mode": "synthetic" },
193193
"properties": {
194194
"kwd": { "type": "keyword" }
195195
}

docs/reference/mapping/types/numeric.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ Synthetic source always sorts numeric fields and removes duplicates. For example
243243
PUT idx
244244
{
245245
"mappings": {
246-
"_source": { "synthetic": true },
246+
"_source": { "mode": "synthetic" },
247247
"properties": {
248248
"long": { "type": "long" }
249249
}
@@ -271,7 +271,7 @@ Scaled floats will always apply their scaling factor so:
271271
PUT idx
272272
{
273273
"mappings": {
274-
"_source": { "synthetic": true },
274+
"_source": { "mode": "synthetic" },
275275
"properties": {
276276
"f": { "type": "scaled_float", "scaling_factor": 0.01 }
277277
}

docs/reference/mapping/types/text.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Synthetic source always sorts `keyword` fields and removes duplicates, so
173173
PUT idx
174174
{
175175
"mappings": {
176-
"_source": { "synthetic": true },
176+
"_source": { "mode": "synthetic" },
177177
"properties": {
178178
"text": {
179179
"type": "text",

docs/reference/ml/trained-models/apis/get-trained-models-stats.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ The detailed allocation status given the deployment configuration.
9797
(integer)
9898
The current number of nodes where the model is allocated.
9999
100+
`cache_size`:::
101+
(<<byte-units,byte value>>)
102+
The inference cache size (in memory outside the JVM heap) per node for the model.
103+
100104
`state`:::
101105
(string)
102106
The detailed allocation state related to the nodes.

docs/reference/ml/trained-models/apis/start-trained-model-deployment.asciidoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Increasing `threads_per_allocation` means more threads are used when
3434
an inference request is processed on a node. This can improve inference speed
3535
for certain models. It may also result in improvement to throughput.
3636

37-
Increasing `number_of_allocations` means more threads are used to
37+
Increasing `number_of_allocations` means more threads are used to
3838
process multiple inference requests in parallel resulting in throughput
3939
improvement. Each model allocation uses a number of threads defined by
4040
`threads_per_allocation`.
@@ -55,6 +55,11 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=model-id]
5555
[[start-trained-model-deployment-query-params]]
5656
== {api-query-parms-title}
5757

58+
`cache_size`::
59+
(Optional, <<byte-units,byte value>>)
60+
The inference cache size (in memory outside the JVM heap) per node for the model.
61+
The default value is the same size as the `model_size_bytes`. To disable the cache, `0b` can be provided.
62+
5863
`number_of_allocations`::
5964
(Optional, integer)
6065
The total number of allocations this model is assigned across {ml} nodes.

docs/reference/search/profile.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ The API returns the following result:
696696
]
697697
},
698698
{
699-
"name": "MultiBucketCollector: [[my_scoped_agg, my_global_agg]]",
699+
"name": "BucketCollectorWrapper: [BucketCollectorWrapper[bucketCollector=[my_scoped_agg, my_global_agg]]]",
700700
"reason": "aggregation",
701701
"time_in_nanos": 867617
702702
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
[[circuit-breaker-errors]]
2+
=== Circuit breaker errors
3+
4+
{es} uses <<circuit-breaker,circuit breakers>> to prevent nodes from running out
5+
of JVM heap memory. If Elasticsearch estimates an operation would exceed a
6+
circuit breaker, it stops the operation and returns an error.
7+
8+
By default, the <<parent-circuit-breaker,parent circuit breaker>> triggers at
9+
95% JVM memory usage. To prevent errors, we recommend taking steps to reduce
10+
memory pressure if usage consistently exceeds 85%.
11+
12+
[discrete]
13+
[[diagnose-circuit-breaker-errors]]
14+
==== Diagnose circuit breaker errors
15+
16+
**Error messages**
17+
18+
If a request triggers a circuit breaker, {es} returns an error with a `429` HTTP
19+
status code.
20+
21+
[source,js]
22+
----
23+
{
24+
'error': {
25+
'type': 'circuit_breaking_exception',
26+
'reason': '[parent] Data too large, data for [<http_request>] would be [123848638/118.1mb], which is larger than the limit of [123273216/117.5mb], real usage: [120182112/114.6mb], new bytes reserved: [3666526/3.4mb]',
27+
'bytes_wanted': 123848638,
28+
'bytes_limit': 123273216,
29+
'durability': 'TRANSIENT'
30+
},
31+
'status': 429
32+
}
33+
----
34+
// NOTCONSOLE
35+
36+
{es} also writes circuit breaker errors to <<logging,`elasticsearch.log`>>. This
37+
is helpful when automated processes, such as allocation, trigger a circuit
38+
breaker.
39+
40+
[source,txt]
41+
----
42+
Caused by: org.elasticsearch.common.breaker.CircuitBreakingException: [parent] Data too large, data for [<transport_request>] would be [num/numGB], which is larger than the limit of [num/numGB], usages [request=0/0b, fielddata=num/numKB, in_flight_requests=num/numGB, accounting=num/numGB]
43+
----
44+
45+
**Check JVM memory usage**
46+
47+
If you've enabled Stack Monitoring, you can view JVM memory usage in {kib}. In
48+
the main menu, click **Stack Monitoring**. On the Stack Monitoring **Overview**
49+
page, click **Nodes**. The **JVM Heap** column lists the current memory usage
50+
for each node.
51+
52+
You can also use the <<cat-nodes,cat nodes API>> to get the current
53+
`heap.percent` for each node.
54+
55+
[source,console]
56+
----
57+
GET _cat/nodes?v=true&h=name,node*,heap*
58+
----
59+
60+
To get the JVM memory usage for each circuit breaker, use the
61+
<<cluster-nodes-stats,node stats API>>.
62+
63+
[source,console]
64+
----
65+
GET _nodes/stats/breaker
66+
----
67+
68+
[discrete]
69+
[[prevent-circuit-breaker-errors]]
70+
==== Prevent circuit breaker errors
71+
72+
**Reduce JVM memory pressure**
73+
74+
High JVM memory pressure often causes circuit breaker errors. See
75+
<<high-jvm-memory-pressure>>.
76+
77+
**Avoid using fielddata on `text` fields**
78+
79+
For high-cardinality `text` fields, fielddata can use a large amount of JVM
80+
memory. To avoid this, {es} disables fielddata on `text` fields by default. If
81+
you've enabled fielddata and triggered the <<fielddata-circuit-breaker,fielddata
82+
circuit breaker>>, consider disabling it and using a `keyword` field instead.
83+
See <<fielddata>>.
84+
85+
**Clear the fieldata cache**
86+
87+
If you've triggered the fielddata circuit breaker and can't disable fielddata,
88+
use the <<indices-clearcache,clear cache API>> to clear the fielddata cache.
89+
This may disrupt any in-flight searches that use fielddata.
90+
91+
[source,console]
92+
----
93+
POST _cache/clear?fielddata=true
94+
----
95+
// TEST[s/^/PUT my-index\n/]
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
[[disk-usage-exceeded]]
2+
=== Error: disk usage exceeded flood-stage watermark, index has read-only-allow-delete block
3+
4+
This error indicates a data node is critically low on disk space and has reached
5+
the <<cluster-routing-flood-stage,flood-stage disk usage watermark>>. To prevent
6+
a full disk, when a node reaches this watermark, {es} blocks writes to any index
7+
with a shard on the node. If the block affects related system indices, {kib} and
8+
other {stack} features may become unavailable.
9+
10+
{es} will automatically remove the write block when the affected node's disk
11+
usage goes below the <<cluster-routing-watermark-high,high disk watermark>>. To
12+
achieve this, {es} automatically moves some of the affected node's shards to
13+
other nodes in the same data tier.
14+
15+
To verify that shards are moving off the affected node, use the <<cat-shards,cat
16+
shards API>>.
17+
18+
[source,console]
19+
----
20+
GET _cat/shards?v=true
21+
----
22+
23+
If shards remain on the node, use the <<cluster-allocation-explain,cluster
24+
allocation explanation API>> to get an explanation for their allocation status.
25+
26+
[source,console]
27+
----
28+
GET _cluster/allocation/explain
29+
{
30+
"index": "my-index",
31+
"shard": 0,
32+
"primary": false,
33+
"current_node": "my-node"
34+
}
35+
----
36+
// TEST[s/^/PUT my-index\n/]
37+
// TEST[s/"primary": false,/"primary": false/]
38+
// TEST[s/"current_node": "my-node"//]
39+
40+
To immediately restore write operations, you can temporarily increase the disk
41+
watermarks and remove the write block.
42+
43+
[source,console]
44+
----
45+
PUT _cluster/settings
46+
{
47+
"persistent": {
48+
"cluster.routing.allocation.disk.watermark.low": "90%",
49+
"cluster.routing.allocation.disk.watermark.high": "95%",
50+
"cluster.routing.allocation.disk.watermark.flood_stage": "97%"
51+
}
52+
}
53+
54+
PUT */_settings?expand_wildcards=all
55+
{
56+
"index.blocks.read_only_allow_delete": null
57+
}
58+
----
59+
// TEST[s/^/PUT my-index\n/]
60+
61+
As a long-term solution, we recommend you add nodes to the affected data tiers
62+
or upgrade existing nodes to increase disk space. To free up additional disk
63+
space, you can delete unneeded indices using the <<indices-delete-index,delete
64+
index API>>.
65+
66+
[source,console]
67+
----
68+
DELETE my-index
69+
----
70+
// TEST[s/^/PUT my-index\n/]
71+
72+
When a long-term solution is in place, reset or reconfigure the disk watermarks.
73+
74+
[source,console]
75+
----
76+
PUT _cluster/settings
77+
{
78+
"persistent": {
79+
"cluster.routing.allocation.disk.watermark.low": null,
80+
"cluster.routing.allocation.disk.watermark.high": null,
81+
"cluster.routing.allocation.disk.watermark.flood_stage": null
82+
}
83+
}
84+
----

0 commit comments

Comments
 (0)