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

fix(mria_membership): call mria_rlog:role/1 safely #139

Merged

Conversation

SergeTupchiy
Copy link
Contributor

This ensures mria_membership won't crash if RPC to another node fails.

[#member{role = R} = M] -> M;
-define(lookup_member(N_, R_),
case ets:lookup(?TAB, N_) of
[#member{role = R_ = ROLE_} = M_] when ROLE_ /= undefined -> M_;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added ROLE_ /= undefined guard because R can be _..

ieQu1
ieQu1 previously approved these changes Apr 25, 2023
This ensures mria_membership won't crash if RPC to another node fails.
@SergeTupchiy SergeTupchiy merged commit f0b658a into emqx:main Apr 25, 2023
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.

None yet

2 participants