Skip to content

Commit 101b097

Browse files
touch ups, reference the new ShardRoutingState documentation
1 parent a705892 commit 101b097

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/internal/DistributedArchitectureGuide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ works in parallel with the storage engine.)
200200
Each index consists of a fixed number of primary shards. The number of primary shards cannot be changed for the lifetime of the index. Each
201201
primary shard can have zero-to-many replicas used for data redundancy. The number of replicas per shard can be changed dynamically.
202202

203-
The allocation assignment status of each shard copy is tracked by its `ShardRoutingState` state. The `RoutingTable` and `RoutingNodes`
204-
classes are responsible for tracking to which data nodes each shard in the cluster is allocated: see the [routing package javadoc][] for
205-
more details about these structures.
203+
The allocation assignment status of each shard copy is tracked by its [ShardRoutingState][]. The `RoutingTable` and `RoutingNodes` objects
204+
are responsible for tracking to which data nodes each shard in the cluster is allocated: see the [routing package javadoc][] for more
205+
details about these structures.
206206

207207
[routing package javadoc]: https://github.com/elastic/elasticsearch/blob/v9.0.0-beta1/server/src/main/java/org/elasticsearch/cluster/routing/package-info.java
208-
[ShardRoutingState]: TODO NOMERGE
208+
[ShardRoutingState]: https://github.com/elastic/elasticsearch/blob/4c9c82418ed98613edcd91e4d8f818eeec73ce92/server/src/main/java/org/elasticsearch/cluster/routing/ShardRoutingState.java#L12-L46
209209

210210
### Core Components
211211

@@ -253,11 +253,11 @@ The elected master node creates a shard allocation plan with the `DesiredBalance
253253
movements towards the target allocation plan with the `DesiredBalanceReconciler`. The results of the `DesiredBalanceReconciler` is an
254254
updated `RoutingTable`. The `RoutingTable` is part of the cluster state, so the master node updates the cluster state with the new
255255
(incremental) desired shard allocation information. The updated cluster state is then published to the data nodes. Each data node will
256-
observe any change in shard allocation related to that node and take action to achieve the new shard allocation by: initiating creation of
257-
a new empty shard; starting recovery (copying) of an existing shard from another data node; or removing a shard. When the data node
258-
finishes a shard change, a request is sent to the master node to update the shard as having finished recovery/removal in the cluster state.
259-
The cluster state is used by allocation as a fancy work queue: the master node conveys new work to the data nodes, which pick up the work
260-
and report back when done.
256+
observe any change in shard allocation related to itself and take action to achieve the new shard allocation by: initiating creation of a
257+
new empty shard; starting recovery (copying) of an existing shard from another data node; or removing a shard. When the data node finishes
258+
a shard change, a request is sent to the master node to update the shard as having finished recovery/removal in the cluster state. The
259+
cluster state is used by allocation as a fancy work queue: the master node conveys new work to the data nodes, which pick up the work and
260+
report back when done.
261261

262262
- See `DesiredBalanceShardsAllocator#submitReconcileTask` for the master node's cluster state update post-reconciliation.
263263
- See `IndicesClusterStateService#doApplyClusterState` for the data node hook to observe shard changes in the cluster state.

0 commit comments

Comments
 (0)