[erlang-questions] Mnesia nested transactions
Lev Walkin
vlm@REDACTED
Mon Feb 4 19:01:54 CET 2008
Vance Shipley wrote:
> On Mon, Feb 04, 2008 at 05:04:23PM +0100, Dan Gudmundsson wrote:
>> Everything is restarted, it has to if you think about it,
>> the outer may have looks that causes the deadlock.
>
> I'm happy just to have a definitive answer, I'm coding not
> optimizing at this stage, however I don't follow your reasoning.
> If my outer transaction held locks that caused the deadlock
> doesn't it stand to reason the same locks would be there on the
> reattempt?
The outer transaction could hold locks (A) that prevent some other
transaction from executing, while holding yet another set
of locks (B). The inner transaction could start waiting on
locks (B), hence the deadlock that can be fixed by restarting
the outer transaction.
--
Lev Walkin
vlm@REDACTED
More information about the erlang-questions
mailing list