[erlang-questions] auto-syncing mnesia after a network split

Claes Wikström <>
Sun Dec 7 23:57:29 CET 2008


mats cronqvist wrote:
> "Felix Hamilton" <> writes:
> 
>> I have used NTP (the Network Time Protocol) quite effectively to sync
>> timestamps in widely distributed systems with a fairly high degree of
>> accuracy.
> 
>   i personally would not bet a dirty sock on ordering events by time
>   stamps (in a distributed system). and for once Leslie Lamport seems
>   to agreewith me.
> 

I think I would. In retrospect I think the worst part of mnesia (apart
from the sucky dets module I once wrote) is how we chose to deal with
partitioned networks.

We should have chosen to rely on the system clock. For example if
all nodes make a persistent note of when they lost contact with other
nodes. Once they reunite they could compare timestamps, and also compare
timestamps on the last committed transaction.
In a vast majority of cases it would be possible to automatically chose
a winner.

Assuming the clocks on all involved hosts are sufficiently synchronized
by NTP that is.

Furthermore - since this only affects recovery after partitioning - this
can still be added.


/klacke



More information about the erlang-questions mailing list