[
https://issues.jboss.org/browse/ISPN-2378?page=com.atlassian.jira.plugin....
]
Thomas Fromm commented on ISPN-2378:
------------------------------------
So results:
In LockSupportCacheStore the results of aquireGlobal were ignored inside loadAllKeys (and
some other methods). In some case aquireGlobal(...) returns false, the locks are already
released, so the finally block tries again to release them.
It was just needed to make sure, that in case of aquireGlobal(...)==false
releaseGlobalLock(false) is not called inside the finally.
I tried to find an easy way to simulate such situation, but I found no simple way to mock
this behaviour in a useful manner. So I created PR without unit test.
I attached an test to this ticket, where the problem runs into error, when the PR is not
applied. This test is not really useful as unit test.
IllegalMonitorStateException when using
LockSupportCacheStore.loadAllKeys
-------------------------------------------------------------------------
Key: ISPN-2378
URL:
https://issues.jboss.org/browse/ISPN-2378
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 5.2.0.Beta1
Reporter: Thomas Fromm
Assignee: Thomas Fromm
Priority: Critical
Attachments: ISPN2378.java
When accessing cache store from different threads:
java.lang.IllegalMonitorStateException: attempt to unlock read lock, not locked by
current thread
at
java.util.concurrent.locks.ReentrantReadWriteLock$Sync.unmatchedUnlockException(ReentrantReadWriteLock.java:447)
at
java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:431)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1340)
at
java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:883)
at
org.infinispan.util.concurrent.locks.StripedLock.releaseGlobalLock(StripedLock.java:243)
at
org.infinispan.loaders.LockSupportCacheStore.releaseGlobalLock(LockSupportCacheStore.java:134)
at
org.infinispan.loaders.LockSupportCacheStore.loadAllKeys(LockSupportCacheStore.java:177)
...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira