-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Support multiget actions during split #141560
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?
Conversation
|
Pinging @elastic/es-distributed (Team:Distributed) |
bcully
left a comment
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 - had a couple of questions, nothing major. Will there be a corresponding end-to-end test for this?
| refresh = in.readBoolean(); | ||
| realtime = in.readBoolean(); | ||
| forceSyntheticSource = in.readBoolean(); | ||
| splitShardCountSummary = new SplitShardCountSummary(in); |
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.
doesn't this need a transport version guard?
| private final ProjectMetadata projectMetadata; | ||
| private final BiConsumer<MultiGetShardRequest, ActionListener<MultiGetShardResponse>> executeRequest; | ||
|
|
||
| private MultiGetShardSplitHelper() { |
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.
does this do anything? I thought the existence of the constructor with args meant there already was no default no arg constructor?
| * Helper class for coordinating multi-get shard requests during index resharding/splitting. | ||
| * Similar to ReplicationSplitHelper, this handles the logic for detecting stale requests | ||
| * and splitting them across multiple shards when the coordinator's view is one split behind. | ||
| * | ||
| * This class provides both utility methods for splitting/combining requests and coordination | ||
| * logic for executing split requests. |
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.
Would it be worth trying to share logic between this and ReplicationSplitHelper? I suppose it means introducing some potentially annoying abstractions, but they do look pretty similar and I wonder whether it would help with maintenance. Potentially a followup?
This commit ensures that multiget is properly delegated to new target
shards in the middle of a split.