When the MVCC transaction manager is used, all transactions are executed concurrently Sometimes concurrent transactions modify the same objects, thus creating transaction conflicts.
The transaction manager resolves those conflicts by aborting one of the conflicting transactions and letting the other one commit its updates.
• Applications should manage MCO_E_CONFLICT return code:
do { mco_trans_start( db, MCO_READ_WRITE, MCO_TRANS_FOREGROUND, &t);
...<update database>...
rc = mco_trans_commit(t);
} while ( rc == MCO_E_CONFLICT );
If the number of conflicts is too high, the transaction manager temporarily turns the optimistic control off and continues scheduling database transactions using the pessimistic approach.
MVCC: Managing Conflicts
最新推荐文章于 2023-07-31 23:16:33 发布