-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[BUG] Race in node-left and node-join can prevent node from joining the cluster indefinitely #4874
Comments
Interesting, is there no ordering guarantee in cluster manager processing (it processed node-join before node-left)? |
Thats right @muralikpbhat, the OpenSearch/server/src/main/java/org/opensearch/cluster/NodeConnectionsService.java Lines 164 to 177 in 3aef125
|
Looking into it. |
@amkhar : Can we please find owner for this issue ? |
Describe the bug
A node in an OpenSearch cluster can fail due to many reasons(health-check failure/lagging etc)which triggers a
node-left
cluster state update on the leader which is responsible for removing the connections as a part of applying the new(node-left) cluster state. However it is possible that a data node triggers anode-join
quickly(before the leader has removed the connection as a part of cluster state apply) that reuses the connection and attempts to connect to the leader. At this point the leader starts to process anode-join
request, updates its followers and schedules a follower checker on the newly joined node. But before the follower checker can get to this connection the in-flightnode-left
cluster state updates cleans up the connection only for the follower checker to realize the node is not connected thereby failing the follower checks and triggering anothernode-left
. The leader doesn't even send thenode-join
cluster state to the data node since it thinks it isn't connected as a result the peer finder keeps on sending join request to the leader and the loop goes on.....Node join
Follower checker scheduled post
node-join
which fails to find a connectionData node gets added without the connection mapped(non-verifiable through logs)
Data node gets removed
Expected behavior
node join and leaves shouldn't interfere and allow transitions to happens cleanly without getting deadlocked
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: