[erlang-questions] mnesia async vs sync

Ryan <>
Fri Mar 11 00:25:11 CET 2016


On 03/10/2016 05:10 PM, Roberto Ostinelli wrote:
> Thank you for your input.
>
> This is interesting since the documentation [1] states:
>
> "By passing the same "fun" as an argument to the function 
> mnesia:sync_dirty(Fun [, Args]) 
> <http://erlang.org/doc/man/mnesia.html#sync_dirty-2>, it is performed 
> in almost the same context as the function mnesia:async_dirty/1,2 
> <http://erlang.org/doc/man/mnesia.html#async_dirty-2>. The difference 
> is that the operations are performed synchronously. The caller waits 
> for the updates to be performed on all active replicas."
>
> Maybe I'm not reading this right?
>
I agree that those docs imply an async_dirty call doesn't wait for 
anything beyond the one node. It specifically says, under async_dirty, 
that, "The functions wait for the operation to be performed on one node 
but not the others. If the table resides locally, no waiting occurs."

I may have misinterpreted the code I was looking at, or the docs could 
be misleading. I'll wait eagerly for someone more well-informed to come 
along and shed some light on the situation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160310/940b3367/attachment-0001.html>


More information about the erlang-questions mailing list