-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Adjust method to transition split state #126179
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
Adjust method to transition split state #126179
Conversation
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
server/src/main/java/org/elasticsearch/cluster/metadata/IndexReshardingMetadata.java
Show resolved
Hide resolved
IndexReshardingState.Split.TargetShardState[] newTargets = Arrays.copyOf( | ||
splitState.targetShards(), | ||
splitState.targetShards().length | ||
); |
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.
Maybe we should make a builder to centralize the logic for creating a new state instead of mutating the existing one?
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.
I think you had already created one that I wasn't using. I just switched to that.
server/src/main/java/org/elasticsearch/cluster/metadata/IndexReshardingMetadata.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/metadata/IndexReshardingState.java
Outdated
Show resolved
Hide resolved
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.
LGTM
Make the method to transition to handoff be generic and support multiple
states.