Shutting down Mnesia with replicas and dirty reads

Igor Ribeiro Sucupira <>
Fri Jun 11 20:06:21 CEST 2010


I'm doing some shutdown tests with Mnesia, which are equivalent to
this scenario:
- A Mnesia pool with 3 nodes. Let's call them X, Y, and Z.
- Nodes X and Y both hold a copy of all data.
- Node Z is performing reads and writes, but doesn't have any local
data (Mnesia ends up being just a "router" to X and Y).
- I stop Mnesia on node X and see what happens.

It seems that the only operations that fail are sync_dirty reads
(which are the only dirty operations I perform). From a quick look at
Mnesia's source code, I believe this is expected to happen (for I
dirty read, Mnesia just checks the where_to_read property and performs
the operation on that node, without retrying).

My question is: using transactions/sync_transactions, are all
operations guaranteed to succeed even if one of the replicas goes down
during the operation, as long as there's at least one replica
remaining, accessible and perfectly operational?


"The secret of joy in work is contained in one word - excellence. To
know how to do something well is to enjoy it." - Pearl S. Buck.

More information about the erlang-questions mailing list