Skip to content
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

When the nodes leave and start at the same time in a large-capacity consul cluster, some member states will continue to keep leaving, not alive. #662

Open
yangjunmyfm192085 opened this issue Sep 9, 2022 · 0 comments · May be fixed by #663

Comments

@yangjunmyfm192085
Copy link

I am in a consul scenario with 3 servers and 150 clients.
When 150 clients leave at the same time and restart, some member states show leaving
Further analysis, the following scenarios appear

  • Node A and Node B are both rebooted
  • After node A starts, it receives the leave message from B, and A caches the type and ltime of the message to recentIntents
  • When A receives the join message from B, the join message is smaller than the leave message ltime. As a result, In A consul members, the state of B is always leaving.

The source code is as follows

serf/serf/serf.go

Line 1111 in 830be12

return upsertIntent(s.recentIntents, leaveMsg.Node, messageLeaveType, leaveMsg.LTime, time.Now)

serf/serf/serf.go

Line 1220 in 830be12

return upsertIntent(s.recentIntents, joinMsg.Node, messageJoinType, joinMsg.LTime, time.Now)

member.Status = StatusLeaving

serf/serf/serf.go

Line 1225 in 830be12

return false

/kind bug

@yangjunmyfm192085 yangjunmyfm192085 changed the title When the nodes leave and start at the same time in a large-capacity consul cluster, some member states will continue to keep leaving,not alive. When the nodes leave and start at the same time in a large-capacity consul cluster, some member states will continue to keep leaving, not alive. Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant