@@ -198,19 +198,14 @@ works in parallel with the storage engine.)
198198### Indexes and Shards
199199
200200Each index consists of a fixed number of primary shards. The number of primary shards cannot be changed for the lifetime of the index. Each
201- primary shard can have zero-to-many replicas used for data redundancy. The number of replicas per shard can be changed in runtime. Each
202- shard copy (primary or replica) can be in one of four states:
203- - UNASSIGNED: Not present on / assigned to any data node.
204- - STARTED: Assigned to a specific data node and ready for indexing and search requests.
205- - INITIALIZING: Running recovery on an assigned node. Fast for an empty new index shard. Possibly lengthy when restoring from a snapshot or
206- moving from another node
207- - RELOCATING - The state of a shard on a source node while the shard is being moved away to a target node: the target node is running
208- recovery.
209-
210- The ` RoutingTable ` and ` RoutingNodes ` classes are responsible for tracking to which data nodes each shard in the cluster is allocated: see
211- the [ routing package javadoc] [ ] for more details about these structures.
201+ primary shard can have zero-to-many replicas used for data redundancy. The number of replicas per shard can be changed dynamically.
202+
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.
212206
213207[ 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
214209
215210### Core Components
216211
@@ -258,15 +253,15 @@ The elected master node creates a shard allocation plan with the `DesiredBalance
258253movements towards the target allocation plan with the ` DesiredBalanceReconciler ` . The results of the ` DesiredBalanceReconciler ` is an
259254updated ` RoutingTable ` . The ` RoutingTable ` is part of the cluster state, so the master node updates the cluster state with the new
260255(incremental) desired shard allocation information. The updated cluster state is then published to the data nodes. Each data node will
261- observe any change in shard allocation related to that node and take action to achieve the new shard allocation by initiating creation of a
262- new empty shard, starting recovery (copying) of an existing shard from another data node, or remove a shard. When the data node finishes
263- 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
264- 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
265- report back when done.
266-
267- See ` DesiredBalanceShardsAllocator#submitReconcileTask ` for the master node's cluster state update post-reconciliation.
268- See ` IndicesClusterStateService#doApplyClusterState ` for the data node hook to observe shard changes in the cluster state.
269- See ` ShardStateAction#sendShardAction ` for the data node request to the master node on completion of a shard state change.
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.
261+
262+ - See ` DesiredBalanceShardsAllocator#submitReconcileTask ` for the master node's cluster state update post-reconciliation.
263+ - See ` IndicesClusterStateService#doApplyClusterState ` for the data node hook to observe shard changes in the cluster state.
264+ - See ` ShardStateAction#sendShardAction ` for the data node request to the master node on completion of a shard state change.
270265
271266# Autoscaling
272267
0 commit comments