esl/unsplit — pull request #2 by dszoboszlay (2013-08-26 19:35:09+00:00)
Title: Stop merging when remote node is not alive

Sometimes `unsplit_server` attempts to stitch together nodes before they would become reconnected. In this case `IslandB` is not a list, but a badrpc error tuple that crashes `intersection/2`.

The patch halts the stitching when rpc fails. It assumes a new Mnesia event will be sent later on, when `NodeB` is reconnected. This looks like a valid assumption: I have a CT test suite that relies on unsplit resolving netsplits and it worked reliably even when `unsplit_server` crashed. The only symptom was that when it happened too frequently in a short time the whole application stopped, which got caught by a sanity check later on.