Subject Re: [firebird-support] Questions to deadlock-situations
Author Svein Erling Tysvaer
I'm not quite certain how to describe the situation you mention, maybe
I'd use 'lock' rather than deadlock.

Say you have a situation with two transactions in WAIT isolation.
TransactionA has updated RecordA and TransactionB has updated RecordB.
Neither of them have committed. Simultaneously, TransactionA wants to
update RecordB and TransactionB update RecordA. Both gets rejected, and
TransactionA waits for TransactionB to release the lock on RecordB,
whereas TransactionB waits for TransactionA to release the lock on
RecordA. That's what I call a deadlock and something has to be done for
them to not wait indefinitely (and theoretically, a deadlock could
involve more than two transactions - confusing the picture quite a lot
more than this simple situation).


Josef Gschwendtner wrote:
> Hi,
> if a deadlock occurs, the user has to wait (until the deadlock-situation
> is gone --> wait) or is getting a deadlock-exception (--> nowait).
> In our tests, none of these situations creates an entry in Firebird.log.
> On the other hand, we have a Firebird.log file which >>has<< "Deadlock"
> entries.
> Could anybody give us some information in which "special" situation
> "Deadlock" is written into the logfile.
> Thank you very much,
> Josef Gschwendtner