-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Reuse existing allocation id for primary shard allocation #16530
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
Conversation
@@ -411,13 +411,17 @@ void moveToUnassigned(UnassignedInfo unassignedInfo) { | |||
/** | |||
* Initializes an unassigned shard on a node. | |||
*/ | |||
void initialize(String nodeId, long expectedShardSize) { | |||
void initialize(String nodeId, String existingAllocationId, long expectedShardSize) { |
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.
can we document that the existingAllocationId can be null?
Left some very minor comments... |
d6ec6cd
to
ed93ebe
Compare
@bleskes Thanks for the review! I've updated the PR according to your suggestions and made one additional change: I removed the overloads of the |
LGTM. Thanks @ywelsch |
ed93ebe
to
94f19d7
Compare
Reuse existing allocation id for primary shard allocation
This solves an issue where shard was activated by master but the cluster crashes before the target node persisted the shard state.
Relates to #14739