1 Reply Latest reply on Jan 31, 2006 12:38 PM by Manik Surtani

    Optimistic locking and state transfer

    Brian Stansberry Master

      Just wanted to confirm my understanding re: optimistic locking and state transfer -- namely that the use of optimistic locking has no impact on state transfer. Please advise if the following is incorrect:

      As I understand it, the workspace used by optimistic locking is only meaningful on the cache instance where the work is being performed. The replication aspects work the same as with pessimistic locking -- (after all required locks have been obtained on the local cache) in the beforeCompletion phase of a commit, a prepare() message is sent to the other cache instances. The semantics of how that prepare() message is handled by the other caches is no different than the pessimistic locking case.

      The effect of this is that a cache instance that has received a state transfer has all state needed to handle a subsequent optimistic prepare() call, even though none of the workspace info was transferred.