[erlang-questions] mnesia sync_transactions not fsynced?

Håkan Mattsson hm@REDACTED
Thu Oct 27 14:17:07 CEST 2011


On Thu, Oct 27, 2011 at 1:52 PM, Dan Gudmundsson <dangud@REDACTED> wrote:
> On Thu, Oct 27, 2011 at 1:36 PM, Matthew Sackman <matthew@REDACTED> wrote:
>> On Thu, Oct 27, 2011 at 01:24:59PM +0200, Dan Gudmundsson wrote:
>> Do you agree that the lack of a disk_log:sync means that the complete
>> commits that are actually written to disk may be a subset of the commits
>> that mnesia completes?
>
> Yes that is correct.
> If you want more safety you add more nodes/replicas.

A call to disk_log:sync would increase the probability for the committed data to
be stored on durable media, but there is no guarantee. The data may still be
lost in case of a hard reboot or a power failure. Write caches are evil in this
regard.

Anyway, the subset of the commits that may be lost are the last written ones
before a crash/shutdown. It is not a random subset.

/Håkan



More information about the erlang-questions mailing list