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

EMQX-10974 heal partition once majority is alive #180

Conversation

SergeTupchiy
Copy link
Contributor

No description provided.

@SergeTupchiy SergeTupchiy force-pushed the EMQX-10974-heal-partition-once-majority-is-alive branch from a9919df to 13b55d1 Compare June 18, 2024 16:22
@SergeTupchiy SergeTupchiy marked this pull request as ready for review June 19, 2024 15:27
is_majority_alive() ->
All = mria_mnesia:cluster_nodes(all),
NotAliveLen = length(All -- [node() | nodes()]),
NotAliveLen < (length(All) div 2).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that length(ALL) = 1 but node() is not in All?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is called by a leader core node, so it's hard to imagine that node() is not a member of Mnesia cluster (thus not in All) 🤔

@SergeTupchiy SergeTupchiy merged commit 2516d1a into emqx:main Jun 20, 2024
1 check passed
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 this pull request may close these issues.

3 participants