[erlang-questions] dets durability
Michael Truog
mjtruog@REDACTED
Sun Sep 13 04:08:06 CEST 2009
I suspect "every update is guaranteed to be reflected in the dets" only
if you use dets:sync/1 on the table after doing an dets:insert/2 or
dets:delete/2 before a reboot. However, since that probably can not
always consistently occur (can not assume a insert/sync or delete/sync
is atomic) in reality I think "you may not have every update, but the
dets will be in a consistent state. no partial updates will be applied
(no mangled records)", is a more realistic assessment.
Paul Mineiro wrote:
> 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.
>
> thanks in advance,
>
> -- p
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>
>
More information about the erlang-questions
mailing list