Subject | Re: [firebird-support] Re: Firebird stops accepting connections after heavy load for 2-10 hours |
---|---|
Author | Ann W. Harrison |
Post date | 2006-05-15T20:10:14Z |
Stan wrote:
transactions don't wait anyway. Generally, no wait is a
way to get more deadlocks.
transactions in order to get a consistent view of data and avoid
accidentally contaminating one transaction with part of the work
of another. How can that happen. Suppose you've got a table of
deposits and a table of withdrawals. Transaction one creates a
withdrawal in one table and a corresponding deposit in another,
then commits. Transaction two reads the withdrawal table before
transaction one changes it, so does not see the withdrawal. But
before transaction two can read the deposit table, transaction
one makes its changes and commits, so transaction two sees half
of the actions of transaction one. That is a bad thing.
As far as I know, the purpose of NO_REC_VERSION is to cause
deadlock like errors where none are required, I wouldn't use
that either.
Regards,
Ann
>Why no wait? It doesn't make much difference since read
> Read transactions are opened:
> ibase_trans(IBASE_READ|IBASE_CONCURRENCY|IBASE_NOWAIT,$dbh);
transactions don't wait anyway. Generally, no wait is a
way to get more deadlocks.
>I would recommend using IBASE_CONCURRENCY, particularly for write
> Write transactions are pened:
> ibase_trans(IBASE_WRITE|IBASE_COMMITTED|IBASE_REC_NO_VERSION|IBASE_NOWAIT,
> $dbh);
>
transactions in order to get a consistent view of data and avoid
accidentally contaminating one transaction with part of the work
of another. How can that happen. Suppose you've got a table of
deposits and a table of withdrawals. Transaction one creates a
withdrawal in one table and a corresponding deposit in another,
then commits. Transaction two reads the withdrawal table before
transaction one changes it, so does not see the withdrawal. But
before transaction two can read the deposit table, transaction
one makes its changes and commits, so transaction two sees half
of the actions of transaction one. That is a bad thing.
As far as I know, the purpose of NO_REC_VERSION is to cause
deadlock like errors where none are required, I wouldn't use
that either.
Regards,
Ann