[erlang-questions] Re: Does mnesia create temporary ETS tables during transactions?

Ulf Wiger ulf.wiger@REDACTED
Tue Jul 21 18:02:16 CEST 2009


mats cronqvist wrote:
> Sergey Samokhin <prikrutil@REDACTED> writes:
> 
>> Hi!
>>
>> Is this right that every time I do mnesia:transaction/1 a temprorary
>> ETS table is created?
> 
>   Yes.
>   Except, I don't know about nested transactions.

When you start a nested transaction, an ETS table is created,
and all the data from the surrounding transaction are copied
to it. Upon commit, all data is copied back; otherwise, the
table is simply discarded.

BR,
Ulf W
-- 
Ulf Wiger
CTO, Erlang Training & Consulting Ltd
http://www.erlang-consulting.com


More information about the erlang-questions mailing list