<div dir="auto">Many thanks Mikael. Each file role is clear now. </div><div dir="auto"><br></div><div dir="auto">But I still don’t get how the system recover from a failure. What Mnesia does in that case?</div><div dir="auto">I suppose it will check the transaction logs first. </div><div dir="auto">Please elaborate. </div><div dir="auto"><br></div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Wed. 14 April 2021 at 20:27, Mikael Pettersson <<a href="mailto:mikpelinux@gmail.com">mikpelinux@gmail.com</a>> wrote :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">On Wed, Apr 14, 2021 at 6:46 PM Frank Muller <<a href="mailto:frank.muller.erl@gmail.com" target="_blank">frank.muller.erl@gmail.com</a>> wrote:<br>
><br>
> Hi Mnesia users/experts,<br>
><br>
> Could someone pls explain me the roles of these files: LATEST.LOG, DAT, DCT and DCL?<br>
<br>
DCT? Did you mean DCD?<br>
<br>
> Read the doc multiple times but couldn’t fully grasp their roles:<br>
> <a href="https://erlang.org/doc/apps/mnesia/Mnesia_chap7.html#log-file" rel="noreferrer" target="_blank">https://erlang.org/doc/apps/mnesia/Mnesia_chap7.html#log-file</a><br>
><br>
> What are they for?<br>
<br>
DCD and DCL files represent disc_copies tables. The DCD is an image of<br>
the contents from the latest time the table was "dumped", while the<br>
DCL contains a log of the side-effects made to that table since it was<br>
dumped. A dump creates a new DCD and removes the DCL.<br>
<br>
DAT files are DETS:es which contain disc_only_copies tables.<br>
<br>
SCHEMA.DAT is a special DETS that contains the schema for that Mnesia instance.<br>
<br>
LATEST.LOG is Mnesia's transaction log, which is periodically flushed<br>
to the updated tables.<br>
<br>
> 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.<br>
<br>
See above.<br>
<br>
> Finally which ones are important to keep and which aren’t?<br>
<br>
They are all important.<br>
</blockquote></div></div>