[erlang-bugs] documentation bug(s) - mnesia:lock/2

Göran Stupalo stupalo@REDACTED
Wed Oct 10 10:16:38 CEST 2007


We will try to fix it in R12B.

/Goran

Ulf Wiger wrote:
> In the documentation for mnesia:lock/2,
> 
> http://www.erlang.org/doc/man/mnesia.html#lock/2
> 
> one can read the following:
> 
> Currently, two kinds of LockItem's are supported by this function:
> 
> "{table, Tab}
>     This acquires a lock of type LockKind on the entire table Tab.
> {global, GlobalKey, Nodes}
>     This acquires a lock of type LockKind on the global resource
> GlobalKey. The lock is acquired on all active nodes in the Nodes list.
> "
> 
> but the function also supports a third kind of LockItem (perhaps the most
> interesting):
> 
> {record, Tab, Key}
> 
> 
> Furthermore, it states that stick_write is not supported by the
> function, but looking at the source, not only is sticky_write
> (note the spelling) supported, but also 'none'.
> 
> Finally, looking at the function prototype:
> 
> lock(LockItem, LockKind) -> GoodNodes | transaction abort
> 
> This doesn't seem to be correct either. The function returns
> the result of mnesia:read({Tab,Key}), or something to that
> effect.
> 
> BR,
> Ulf W
> 
> BR,
> Ulf W
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-bugs
> 

-- 
Göran Stupalo, Erlang/OTP, Ericsson AB




More information about the erlang-bugs mailing list