mnesia:lock(Item, sticky_write) bad return value

Ulf Wiger ulf.wiger@REDACTED
Mon Dec 13 07:29:51 CET 2010


Eshell V5.8.1  (abort with ^G)
1> mnesia:create_schema([node()]).
ok
2> mnesia:start().
ok
3> mnesia:create_table(t,[{ram_copies,[node()]}]).
{atomic,ok}
4> mnesia:transaction(fun() -> mnesia:lock({table,t},sticky_write) end).
{atomic,[nonode@REDACTED]}
5> mnesia:transaction(fun() -> mnesia:lock({table,t},sticky_write) end).
{atomic,granted}

According to the manual, mnesia:lock/2 returns Nodes | ok | transaction abort

When using the lock type sticky_write, you get the correct return value
the first time, but not for subsequent calls.

BR,
Ulf W

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com





More information about the erlang-bugs mailing list