dets with Mnesia question

Yariv Sadan yarivvv@REDACTED
Thu Jul 20 15:20:22 CEST 2006


Hi,

Currently, if you're using a dets table and the VM crashes, the dets
table would have to be repaired next time it's opened. The repair
process involves scanning through the whole table, which could take a
while for long tables (it was mentioned in this list it could take
half an hour for big tables, which is too long for some systems).

When dets is used outside of Mnesia, this is really the only solution
that makes sense AFAIK, because there's no information on the activity
that took place during the crash. However, when dets is used within
Mnesia, the Mnesia system knows exactly which records in the table are
in a "dirty" state by looking at the transaction log, so maybe dets
could use this information.

My question is, would it be possible to shorten the repair time by
modifing the dets startup procedure such that Mnesia could "inform" it
of exactly which records need to be cleaned up and what their real
values should be?

I just want to know if it's possible before I seriously start looking
at the source code to see if I can hack something...

Best,
Yariv



More information about the erlang-questions mailing list