List Info

Thread: documentation bug(s) - mnesia:lock/2




documentation bug(s) - mnesia:lock/2
user name
2007-10-08 07:59:56
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-bugserlang.org
ht
tp://www.erlang.org/mailman/listinfo/erlang-bugs

Re: documentation bug(s) - mnesia:lock/2
user name
2007-10-10 03:16:38
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-bugserlang.org
> ht
tp://www.erlang.org/mailman/listinfo/erlang-bugs
> 

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

_______________________________________________
erlang-bugs mailing list
erlang-bugserlang.org
ht
tp://www.erlang.org/mailman/listinfo/erlang-bugs

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )