-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Improve ShardRoutingState docs #126875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Improve ShardRoutingState docs #126875
Conversation
Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few tiny comments
server/src/main/java/org/elasticsearch/cluster/routing/ShardRoutingState.java
Outdated
Show resolved
Hide resolved
* The shard is not assigned to any node; any data which it contains is unavailable to the cluster. | ||
* | ||
* A shard transitions from {@link #UNASSIGNED} to {@link #INITIALIZING} when the master wants an assigned data node to create or start | ||
* recovering this shard copy. A shard may also transition back to {@link #UNASSIGNED} in case of an assignment failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really any failure puts it back to UNASSIGNED
- the phrase "assignment failure" indicates to me a problem in allocation (the process which assigns shards to nodes) but in fact most unassignments will be due to other failures.
* recovering this shard copy. A shard may also transition back to {@link #UNASSIGNED} in case of an assignment failure. | |
* recovering this shard copy. A shard may also transition back to {@link #UNASSIGNED} in case of a failure. |
* The shard is assigned to a node and the recovery process has begun. The shard data is not yet available on the node initializing the | ||
* shard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny nitpick: if the shard is in IndexShardState#POST_RECOVERY
then it can respond to searches even before it's moved to ShardRoutingState#STARTED
in the cluster state.
server/src/main/java/org/elasticsearch/cluster/routing/ShardRoutingState.java
Outdated
Show resolved
Hide resolved
…utingState.java Co-authored-by: David Turner <david.turner@elastic.co>
…utingState.java Co-authored-by: David Turner <david.turner@elastic.co>
@DaveCTurner Improving the class docs in reference to this comment thread.
I want to reference it in the other PR, so I'm committing it separately.