In specific circumstances mria_mnesia:copy_table/2 may fail with {system_limit, '$mria_rlog_sync', {Node, none_active}} error, which crashes the node.
Consider the following scenario:
Node N1 starts up and bootstraps Mria.
Node N2 starts up and bootstraps Mria.
Node N2 joins cluster consisting of node N1.
Node N2 runs mria_mnesia:join_cluster/1 and starts Mria again.
At the exact same time node N1 decides to restart for some reason.
During bootstrap, node N2 tries to copy $mria_rlog_sync table.
Mnesia sees there's nowhere to copy from and aborts the operation.
Mria fails to start.
While unlikely, in practice this might be achieved when the operator performs unusual maintenance operations, e.g. simultaneously requests version upgrade and scales the cluster up.
In specific circumstances
mria_mnesia:copy_table/2
may fail with{system_limit, '$mria_rlog_sync', {Node, none_active}}
error, which crashes the node.Consider the following scenario:
N1
starts up and bootstraps Mria.N2
starts up and bootstraps Mria.N2
joins cluster consisting of nodeN1
.N2
runsmria_mnesia:join_cluster/1
and starts Mria again.N1
decides to restart for some reason.N2
tries to copy$mria_rlog_sync
table.While unlikely, in practice this might be achieved when the operator performs unusual maintenance operations, e.g. simultaneously requests version upgrade and scales the cluster up.
Fixes EMQX-13309.