Subject | Re: [firebird-support] Questions on concurrent updates |
---|---|
Author | Ann W. Harrison |
Post date | 2007-06-14T16:29:12Z |
Sean wrote:
it doesn't have to wait for A. If it waits, it will get an error when
A commits.
really an optimistic concurrency transaction system - it's a bit more
cheery than most record or page locking schemes, but still returns
errors on the operation, not on commit.
transactions at its start. A read-committed transaction updates
the state of transactions as it reads records.
Regards,
Ann
>TransB updates the version of the record that A committed, as long as
> 1. I have a table with 3 columns, {ID, A, B}.
>
> There are two transactions, TransA and TransB. TransA updates column A
> of a row, and TransB updates column B of the *same* row. Both
> transactions use READ COMMITTED isolation with RECORD_VERSION.
>
> Say, TransA comes in first and then TransB. TransA modifies the column
> A and commits. TransB updates column B. Since TransB's TID is newer
> than TransA's, TransB can commit the modification successfully, I think.
it doesn't have to wait for A. If it waits, it will get an error when
A commits.
>The value from TransA.
> My question is, what is the value of column A? Is it the value from
> TransA? I hope the value is not reset back to original value by TransB.
>Not committing - the error happens on the update. Firebird's MVCC isn't
> 2. Update conflict means when a transaction tries committing and fails
> because the latest committed version has changed.
really an optimistic concurrency transaction system - it's a bit more
cheery than most record or page locking schemes, but still returns
errors on the operation, not on commit.
>A concurrency (aka snapshot mode) transaction gets the state of
> The question is, when does a transaction remember the latest committed
> version? At the begin of the transaction?
transactions at its start. A read-committed transaction updates
the state of transactions as it reads records.
Regards,
Ann