Module jc_netsplit

Mnesia does not merge on its own after a net splitheal.

Copyright © (C) 2016, Jim Rosenblum

Behaviours: gen_server.

Authors: Jim Rosenblum (jrosenblum@Jims-MacBook-Pro.local).

Description

Mnesia does not merge on its own after a net splitheal. Also, there is a chance that two Nodes start-up unaware of one another and then the erlang mesh is created; or a race condition allows two Nodes to create independent mnesia 'nodes'. So, each clustr instance will get a unique ClusterId - the Node name of the Node that created the cluster.

If a Node with a cluster's ClusterID dissapears, a new ClusterID will be established from one of the surviving Nodes.

When a Node appears it will either have the same ClusterId as everyone else (all is good), or not (bad). If bad, we should kill all Nodes such that there is one, consistant ClusterId and then flush.

cluster creation: ClusterId established.

nodedown: ClusterId is changed if the Node whose name = ClusterId went down. When there is a split one island is guaranteed to change its ClusterId

nodeup: Either A Node appears having joined the existing cluster and therefore will report the same ClusterId - good; or

It appears believing it is part of a different cluster in which case the node will report different ClusterId - bad.

For any bad outcome, all nodes having the 'different' ClusterId are killed to be restarted by the heart process, and a survivor does a flush.

Function Index

start_link/0Starts the server and links the caller to it.

Function Details

start_link/0

start_link() -> {ok, pid()} | ignore | {error, any()}

Starts the server and links the caller to it.


Generated by EDoc, May 24 2016, 22:38:41.