Skip to content

Commit fa23593

Browse files
Merge branch 'main' into eis-validation
2 parents b53dfb0 + 2bfc700 commit fa23593

File tree

152 files changed

+1307
-475
lines changed

Some content is hidden

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

152 files changed

+1307
-475
lines changed

.buildkite/scripts/dra-update-staging.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ for BRANCH in "${BRANCHES[@]}"; do
3737

3838
if [[ "$SHOULD_TRIGGER" == "true" ]]; then
3939
if [[ "$BRANCH" == "9.0" ]]; then
40-
export VERSION_QUALIFIER="beta1"
40+
export VERSION_QUALIFIER="rc1"
4141
fi
4242
echo "Triggering DRA staging workflow for $BRANCH"
4343
cat << EOF | buildkite-agent pipeline upload

.buildkite/scripts/dra-workflow.trigger.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ source .buildkite/scripts/branches.sh
88

99
for BRANCH in "${BRANCHES[@]}"; do
1010
if [[ "$BRANCH" == "9.0" ]]; then
11-
export VERSION_QUALIFIER="beta1"
11+
export VERSION_QUALIFIER="rc1"
1212
fi
1313

1414
INTAKE_PIPELINE_SLUG="elasticsearch-intake"

docs/changelog/120952.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120952
2+
summary: Add `_metric_names_hash` field to OTel metric mappings
3+
area: Data streams
4+
type: bug
5+
issues: []

docs/changelog/122409.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 122409
2+
summary: Allow setting the `type` in the reroute processor
3+
area: Ingest Node
4+
type: enhancement
5+
issues:
6+
- 121553

docs/changelog/122458.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122458
2+
summary: '`DesiredBalanceReconciler` always returns `AllocationStats`'
3+
area: Allocation
4+
type: bug
5+
issues: []

docs/changelog/122637.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 122637
2+
summary: Use `FallbackSyntheticSourceBlockLoader` for `unsigned_long` and `scaled_float`
3+
fields
4+
area: Mapping
5+
type: enhancement
6+
issues: []

docs/changelog/122731.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122731
2+
summary: Fork post-snapshot-delete cleanup off master thread
3+
area: Snapshot/Restore
4+
type: bug
5+
issues: []

docs/changelog/122857.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122857
2+
summary: Run `TransportGetWatcherSettingsAction` on local node
3+
area: Watcher
4+
type: enhancement
5+
issues: []

docs/internal/DistributedArchitectureGuide.md

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -229,19 +229,45 @@ works in parallel with the storage engine.)
229229

230230
# Allocation
231231

232-
(AllocationService runs on the master node)
233-
234-
(Discuss different deciders that limit allocation. Sketch / list the different deciders that we have.)
235-
236-
### APIs for Balancing Operations
237-
238-
(Significant internal APIs for balancing a cluster)
239-
240-
### Heuristics for Allocation
241-
242-
### Cluster Reroute Command
243-
244-
(How does this command behave with the desired auto balancer.)
232+
### Core Components
233+
234+
The `DesiredBalanceShardsAllocator` is what runs shard allocation decisions. It leverages the `DesiredBalanceComputer` to produce
235+
`DesiredBalance` instances for the cluster based on the latest cluster changes (add/remove nodes, create/remove indices, load, etc.). Then
236+
the `DesiredBalanceReconciler` is invoked to choose the next steps to take to move the cluster from the current shard allocation to the
237+
latest computed `DesiredBalance` shard allocation. The `DesiredBalanceReconciler` will apply changes to a copy of the `RoutingNodes`, which
238+
is then published in a cluster state update that will reach the data nodes to start the individual shard recovery/deletion/move work.
239+
240+
The `DesiredBalanceReconciler` is throttled by cluster settings, like the max number of concurrent shard moves and recoveries per cluster
241+
and node: this is why the `DesiredBalanceReconciler` will make, and publish via cluster state updates, incremental changes to the cluster
242+
shard allocation. The `DesiredBalanceShardsAllocator` is the endpoint for reroute requests, which may trigger immediate requests to the
243+
`DesiredBalanceReconciler`, but asynchronous requests to the `DesiredBalanceComputer` via the `ContinuousComputation` component. Cluster
244+
state changes that affect shard balancing (for example index deletion) all call some reroute method interface that reaches the
245+
`DesiredBalanceShardsAllocator` to run reconciliation and queue a request for the `DesiredBalancerComputer`, leading to desired balance
246+
computation and reconciliation actions. Asynchronous completion of a new `DesiredBalance` will also invoke a reconciliation action, as will
247+
cluster state updates completing shard moves/recoveries (unthrottling the next shard move/recovery).
248+
249+
The `ContinuousComputation` saves the latest desired balance computation request, which holds the cluster information at the time of that
250+
request, and a thread that runs the `DesiredBalanceComputer`. The `ContinuousComputation` thread takes the latest request, with the
251+
associated cluster information, feeds it into the `DesiredBalanceComputer` and publishes a `DesiredBalance` back to the
252+
`DesiredBalanceShardsAllocator` to use for reconciliation actions. Sometimes the `ContinuousComputation` thread's desired balance
253+
computation will be signalled to exit early and publish the initial `DesiredBalance` improvements it has made, when newer rebalancing
254+
requests (due to cluster state changes) have arrived, or in order to begin recovery of unassigned shards as quickly as possible.
255+
256+
### Rebalancing Process
257+
258+
There are different priorities in shard allocation, reflected in which moves the `DesiredBalancerReconciler` selects to do first given that
259+
it can only move, recover, or remove a limited number of shards at once. The first priority is assigning unassigned shards, primaries being
260+
more important than replicas. The second is to move shards that violate any rule (such as node resource limits) as defined by an
261+
`AllocationDecider`. The `AllocationDeciders` holds a group of `AllocationDecider` implementations that place hard constraints on shard
262+
allocation. There is a decider, `DiskThresholdDecider`, that manages disk memory usage thresholds, such that further shards may not be
263+
allowed assignment to a node, or shards may be required to move off because they grew to exceed the disk space; or another,
264+
`FilterAllocationDecider`, that excludes a configurable list of indices from certain nodes; or `MaxRetryAllocationDecider` that will not
265+
attempt to recover a shard on a certain node after so many failed retries. The third priority is to rebalance shards to even out the
266+
relative weight of shards on each node: the intention is to avoid, or ease, future hot-spotting on data nodes due to too many shards being
267+
placed on the same data node. Node shard weight is based on a sum of factors: disk memory usage, projected shard write load, total number
268+
of shards, and an incentive to distribute shards within the same index across different nodes. See the `WeightFunction` and
269+
`NodeAllocationStatsAndWeightsCalculator` classes for more details on the weight calculations that support the `DesiredBalanceComputer`
270+
decisions.
245271

246272
# Autoscaling
247273

docs/reference/ingest/processors/reroute.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ Otherwise, the document will be rejected with a security exception which looks l
4545
|======
4646
| Name | Required | Default | Description
4747
| `destination` | no | - | A static value for the target. Can't be set when the `dataset` or `namespace` option is set.
48+
| `type` | no | `{{data_stream.type}}` a| Field references or a static value for the type part of the data stream name. In addition to the criteria for <<indices-create-api-path-params, index names>>, cannot contain `-` and must be no longer than 100 characters. Example values are `logs` and `metrics`.
49+
50+
Supports field references with a mustache-like syntax (denoted as `{{double}}` or `{{{triple}}}` curly braces). When resolving field references, the processor replaces invalid characters with `_`. Uses the `<type>` part of the index name as a fallback if all field references resolve to a `null`, missing, or non-string value.
4851
| `dataset` | no | `{{data_stream.dataset}}` a| Field references or a static value for the dataset part of the data stream name. In addition to the criteria for <<indices-create-api-path-params, index names>>, cannot contain `-` and must be no longer than 100 characters. Example values are `nginx.access` and `nginx.error`.
4952

5053
Supports field references with a mustache-like syntax (denoted as `{{double}}` or `{{{triple}}}` curly braces). When resolving field references, the processor replaces invalid characters with `_`. Uses the `<dataset>` part of the index name as a fallback if all field references resolve to a `null`, missing, or non-string value.

0 commit comments

Comments
 (0)