The design doc below states:

*" In optimistic transactions, locks are acquired on primary nodes during
the "prepare" phase, then promoted to backup nodes and released once the
transaction is committed. Depending on an isolation level, if Ignite
detects that a version of an entry has been changed since the time it was
requested by a transaction, then the transaction will fail at the "prepare"
phase and it will be up to an application to decide whether to restart the
transaction or not."*

Two questions:

   1. If locks are acquired during the prepare phase, why do we state that
   lock acquisition for optimistic locking is delayed (as compared against
   pessimistic locking)?
   2. If "*ignite detects the version has changed since last request by
   transaction, it will fail at prepare phase*". Very confusing. What is
   the last request? I thought the "last request" means the "prepare" phase
   and if so why we say it may fail during prepare phase?

The graphic make sense to me - i.e. locks for optimistic locking are
acquired on the commit phase and not on the prepare phase.


Please help clarify.


Reply via email to