[erlang-questions] Mnesia, versioning and recovering from network splits
Wed Jan 2 13:14:40 CET 2008
Joel Reymont wrote:
> I think there's a reasonably straightforward way for Mnesia to recover
> from network splits. I also think that it would be much faster to
> merge databases in this scenario than drop a database and reload it
> form backups.
> I believe merging databases would require versioning of Mnesia records
> (simple integer should do) and the addition of a merging mechanism.
> Record versions would be shipped around and the latest version of the
> record would then be pulled by the server that has fallen behind.
> What are the flaws in my thinking?
Integer (a so-called Lamport clock) won't do, it'd need to have vector
clocks, with an integer associated with every participating node in the
mnesia distribution network, for each record (see Wikipedia). However,
even using vector clocks there is no way to guarantee total consistency.
More information about the erlang-questions