[
https://issues.jboss.org/browse/ISPN-5654?page=com.atlassian.jira.plugin....
]
Dan Berindei edited comment on ISPN-5654 at 2/28/17 8:46 AM:
-------------------------------------------------------------
-Looking at the code, the deadlock detection doesn't seem to work at all in most
cases. Lock intentions are only added in {{DeadlockDetectingLockManager.lock(key)}}, which
doesn't get called on the transaction originator unless it's also the primary
owner of the key. Thus lock intentions are never sent from the tx originator to the
primary owners, and deadlock detection for multiple keys only works when all the keys are
owned by the originator.- And of course, same-key deadlocks cannot happen at all with the
single-node locking.
-I propose to remove {{DeadlockDetectingLockManager}} altogether and to deprecate the
related configuration.-
-Update: I had missed {{DeadlockDetectingInterceptor}}, which does add remote lock
intentions on the originator for all the locked keys. So deadlock detection should work,
both with pessimistic locking and with optimistic locking, although the number of
deadlocks should be much smaller with single-node locking.-
was (Author: dan.berindei):
-Looking at the code, the deadlock detection doesn't seem to work at all in most
cases. Lock intentions are only added in {{DeadlockDetectingLockManager.lock(key)}}, which
doesn't get called on the transaction originator unless it's also the primary
owner of the key. Thus lock intentions are never sent from the tx originator to the
primary owners, and deadlock detection for multiple keys only works when all the keys are
owned by the originator.- And of course, same-key deadlocks cannot happen at all with the
single-node locking.
-I propose to remove {{DeadlockDetectingLockManager}} altogether and to deprecate the
related configuration.-
Update: I had missed {{DeadlockDetectingInterceptor}}, which does add remote lock
intentions on the originator for all the locked keys. So deadlock detection should work,
both with pessimistic locking and with optimistic locking, although the number of
deadlocks should be much smaller with single-node locking.
Make DeadlockDetectingLockManager aware of single-node locking
--------------------------------------------------------------
Key: ISPN-5654
URL:
https://issues.jboss.org/browse/ISPN-5654
Project: Infinispan
Issue Type: Task
Components: Core
Affects Versions: 8.0.0.Beta2
Reporter: Dan Berindei
{{DeadlockDetectingLockManager}} seems to assume that the node that started a transaction
acquires a local lock before replicating, which is wrong since we switched to locking only
on the primary owner.
In particular, {{isSameKeyDeadlock}} can probably be removed altogether.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)