[erlang-questions] Ordering of mnesia events
Tue Dec 7 19:57:34 CET 2010
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? We've executed a transaction where exactly one
object has been changed, and as the result got exactly one
notification from Mnesia. I see no problem here. It might be the
problem if there were two notifications which arrived _before_ the
transation is committed. Also the bug is here if table type is bag and
we observe such behaviour...
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.
More information about the erlang-questions