[erlang-questions] dets durability

Attila Rajmund Nohl attila.r.nohl@REDACTED
Sun Sep 13 11:28:17 CEST 2009


2009/9/13, Paul Mineiro <paul-trapexit@REDACTED>:
> i'm having trouble finding the answer to this question.
>
> if i do a bunch of dets operations, e.g., dets:insert/2 and dets:delete/2,
> and then hard reboot the operating system without synchronizing the
> page cache (e.g., hit the power button), and then reopen the dets file:
> what guarantees do i have?
>
> some possible answers are (after the file is "repaired"):
>
>   * every update is guaranteed to be reflected in the dets; or
>   * you may not have every update, but the dets will be in a consistent
> state.  no partial updates will be applied (no mangled records); or
>   * no guarantees, due to some unlikely worst case.

I think it's not that unlikely that the hard drive has a write cache,
so even if the operating system (and the Erlang VM) thinks that the
data made through to the disk (which might not be the case when you
hit the power button), in reality it didn't. So my guess would be "no
guarantees".


More information about the erlang-questions mailing list