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.
Correct. Workspaces are only for local caches - the locks obtained at commit time (when merging workspaces) are the same as pess. locks, and replication is exactly the same - except in timing, but this has no effect at all on state transfer.