[erlang-questions] Ordering of mnesia events

Håkan Mattsson <>
Wed Dec 8 02:24:56 CET 2010

2010/12/7 Andrey Pampukha <>:
> Hi Håkan,
> 2010/12/7, Håkan Mattsson <>:
>> The order of these events are undefined. In fact it is worse than that
>> as not all updates do result in an event. If you for example perform
>> two consecutive writes in the same transaction
>>   mnesia:write(tab1, SomeOtherRec)
>>   mnesia:write(tab1, YetSomeOtherRec)
>> they may result in one or two events depending on table type and the
>> primary key of the record. If the table is a set and two records have the
>> same key, only one event will be sent (the last write).
> Is it really a bug?

No there is no bug. The behavior is intentional.

> I think, the situation when notification is being sent before the
> transaction is actually commited, is worse. I'm not sure if this
> problem does still exist, please correct me if it does not. I've
> faced it couple of times before.

I think that your observation is wrong, The table related events has always
been sent AFTER Mnesia has decided to commit the transaction.


More information about the erlang-questions mailing list