B.2. About Consistency Guarantee
Despite the locking of a single owner instead of all owners, JBoss Data Grid's consistency guarantee remains intact. The consistency guarantee is as follows:
- If Key
Kis hashed to nodes{A,B}and transactionTX1acquires a lock forKon, for example, nodeA. - If another cache access occurs on node
B, or any other node, andTX2attempts to lockK, it fails with a timeout because the transactionTX1already holds a lock onK.
This lock acquisition attempt always fails because the lock for key
K is always deterministically acquired on the same node of the cluster, irrespective of the transaction's origin.