Re: Mnesia files

Frank Muller <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CAFA6GnBf4iYsXhGCktPC9kqN6v6O8iZ=CGAPbiMd_veQACo97w@mail.gmail.com>
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 <[email protected]> wrote
:

> On Wed, Apr 14, 2021 at 6:46 PM Frank Muller <[email protected]>
> 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.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.