Subject Questions on concurrent updates
Author Sean
Hi,

I have a couple of questions on concurrent update:

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.

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.

2. Update conflict means when a transaction tries committing and fails
because the latest committed version has changed.

The question is, when does a transaction remember the latest committed
version? At the begin of the transaction?

Best,
Sean