Mnesia, disk logging, and synchronous disk logging
Scott Lystig Fritchie
fritchie@REDACTED
Tue Jan 24 03:45:50 CET 2006
Howdy. Is there a difference of opinion/definition on what
"synchronous" in Mnesia's synchronous disk logging means?
In the context of disc_copies tables ... it seems to me that Mnesia's
use of the phrase means:
* The transaction coordinator waits synchronously for 2PC votes
from all participants.
* Each participant uses disk_log:log/2 or disk_log:blog/2 to
record local votes and commit/abort decisions, but participants
are *not* using the disk_log:sync/1 to force the log to disk.
The disk_log:sync/1 function has an extremely high penalty, but
sometimes that penalty is worth the cost. For example, some
read+write transactions may contain data that you *really* do not want
to lose. For data that important, if all replicas suddenly lose
power, it is possible to lose the logs and thus the newly-updated data
before it is written safely to disk on each replica machine.
But I can't find a Mnesia transaction knob/button that I can
twist/press to request that level of safety. Is there such a thing?
-Scott
More information about the erlang-questions
mailing list