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-9021 #128

Merged
merged 7 commits into from Mar 10, 2023
Merged

EMQX-9021 #128

merged 7 commits into from Mar 10, 2023

Conversation

ieQu1
Copy link
Member

@ieQu1 ieQu1 commented Mar 7, 2023

Fix problem when running mria:join(Node), mria:leave(), mria:join(Node) sequence of actions on the replicant node.

Oftentimes it leads to hangup of the start callback. I've identified two reasons for this behavior:

  • Mria application restarts for both join and leave. I didn't take into account that OTP's application_master module kills all processes with the group leader matching the pid of the master process of the stopped app. It includes optvar "waker" processes, when they are started from inside mria supervision tree. Prior to ver. 1.0.4 optvar library couldn't handle crashes of the waker processes, and never unblocked the readers.
  • Start callback may involve calls to the application controller. When the replicant leaves the cluster, all tables are blocked until it connects to another core node. It means applications that wait for table can block application controller, and the next invocation of the start callback cannot succeed.

@ieQu1 ieQu1 force-pushed the join-leave-join branch 4 times, most recently from 2cf7eee to 434b5c8 Compare March 9, 2023 20:29
@ieQu1
Copy link
Member Author

ieQu1 commented Mar 9, 2023

Depends on #131

test/mria_SUITE.erl Show resolved Hide resolved
test/mria_autoheal_SUITE.erl Show resolved Hide resolved
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