[erlang-questions] Mnesia and network partitions

Ulf Wiger ulf.wiger@REDACTED
Wed May 25 17:17:07 CEST 2011


Setting master nodes will ensure that restarting nodes will unconditionally load from the masters. In order for this to make a difference after netsplit, you have to restart the nodes that should synch to the remaining nodes. This could be triggered by the inconsistent_database event.

An alternative would be to use http://github.com/esl/unsplit (apologies for the lack of documentation), which makes it possible to recover from netsplits through merge without restarts.

As of R14B03, there is also a feature to enforce (per table) that updates will only succeed if it can be committed on a majority of the replicas. This can be used to minimize the risk of fatal inconsistencies at netsplit.

BR,
Ulf W

On 25 May 2011, at 17:07, Carlo Bertoldi wrote:

> Hi everybody,
> I've got a mnesia schema on two nodes. I connected the nodes, added some data, then
> disconnected the nodes, in order to simulate a network split.
> I changed some data in the slave node, then reconnected the nodes and obtained
> the expected message (** ERROR ** mnesia_event got {inconsistent_database,
> running_partitioned_network, node@REDACTED}).
> The problem is that the data on the slave node is still different from the data in the master node.
> I did set the master node with mnesia:set_master_nodes(), since I understand that this should be enough to get the changes automatically overwritten upon reconnection.
> 
> Thanks,
> Carlo
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com






More information about the erlang-questions mailing list