Mnesia files

Frank Muller frank.muller.erl@REDACTED
Wed Apr 14 23:14:03 CEST 2021


Many thanks Mikael. Each file role is clear now.

But I still don’t get how the system recover from a failure. What Mnesia
does in that case?
I suppose it will check the transaction logs first.
Please elaborate.



Wed. 14 April 2021 at 20:27, Mikael Pettersson <mikpelinux@REDACTED> wrote
:

> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210414/550a7061/attachment.htm>


More information about the erlang-questions mailing list