-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Stateless primary relocations #97162
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
Stateless primary relocations #97162
Conversation
Adds support for proper online relocations of stateless primaries.
Pinging @elastic/es-distributed (Team:Distributed) |
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've seen most of this before, so LGTM. One comment on the test only.
|
||
assertThat(routingNodes.node("node-1").getByShardId(shardId), nullValue()); | ||
assertThat(routingNodes.node("node-2").getByShardId(shardId), nullValue()); | ||
assertThat(routingNodes.node("node-1").getByShardId(shardId).state(), equalTo(RELOCATING)); |
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.
This is the only part that I had not seen before in your changes. I see we're asserting an intermediate state here where the relocation has not fully completed yet (it's in transit from node-1 to node-3). Can we also wait for the completion of the relocation here and assert that it's finally only in node-3?
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.
Yeah we hadn't run these tests before, only the serverless ones, so I expect there might be a few changes needed.
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.
There is no actual relocation in progress here, this is only to verify that the routing table changes as we expect. This test (and the one above) were added to support the temporary change that triggered stateless relocations by just closing all the shards, so now really this test can say that the routing table behaves the same for stateless and regular relocations. I've removed the duplication in d4ca54f.
@elasticmachine please run elasticsearch-ci/part-1 (#97183) |
Adds support for proper online relocations of stateless primaries.