Mnesia files
Mikael Pettersson
mikpelinux@REDACTED
Wed Apr 14 20:27:20 CEST 2021
On Wed, Apr 14, 2021 at 6:46 PM Frank Muller <frank.muller.erl@REDACTED> wrote:
>
> Hi Mnesia users/experts,
>
> Could someone pls explain me the roles of these files: LATEST.LOG, DAT, DCT and DCL?
DCT? Did you mean DCD?
> Read the doc multiple times but couldn’t fully grasp their roles:
> https://erlang.org/doc/apps/mnesia/Mnesia_chap7.html#log-file
>
> What are they for?
DCD and DCL files represent disc_copies tables. The DCD is an image of
the contents from the latest time the table was "dumped", while the
DCL contains a log of the side-effects made to that table since it was
dumped. A dump creates a new DCD and removes the DCL.
DAT files are DETS:es which contain disc_only_copies tables.
SCHEMA.DAT is a special DETS that contains the schema for that Mnesia instance.
LATEST.LOG is Mnesia's transaction log, which is periodically flushed
to the updated tables.
> What happens if in the middle of many transactions I unplug the electrical cable, put it back and restart Mnesia. How these files will help to recover the state.
See above.
> Finally which ones are important to keep and which aren’t?
They are all important.
More information about the erlang-questions
mailing list