Mat
Mat

Reputation: 63

Erlang 13B04: Mnesia write corrupts the table

I'm writing here because I've a probem with Mnesia, in particular it seems that when I start my node and I run the procedure to initialize the database (it makes table and popultes them), one table results corrupted. This table hasn't particular options and is a disk_only_copy.

The initialization has done with a simple transaction in a function used by a lists:foldl.

I'm already try to do all in shell Erlang and all works, the transaction and the record writing returns potive result so there aren't code crashes.

I'm already done a search but there isn't a clear response to this problem: someone tells that it must use the transaction (done but any change), the table is writing out of memory (this isn't because if I do all in shell all works), so what can be?

Thanks to all in advance for the help.

Upvotes: 0

Views: 165

Answers (1)

RichardC
RichardC

Reputation: 10557

A disk_only_copies table uses dets for storage, and in a very old version like 13B04, some bugs in dets may not have been fixed. Try running the same code on a newer version (at least R15B03-1) and see if the same thing happens.

Upvotes: 1

Related Questions