[JBoss JIRA] Created: (ISPN-1418) FileCacheStore throws an IllegalMonitorStateException in FileCacheVamTest
by Dan Berindei (JIRA)
FileCacheStore throws an IllegalMonitorStateException in FileCacheVamTest
-------------------------------------------------------------------------
Key: ISPN-1418
URL: https://issues.jboss.org/browse/ISPN-1418
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 5.1.0.ALPHA2
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Minor
Fix For: 5.1.0.BETA1
If there are no expired elements the bucket will not be modified and the lock doesn't need to be acquired.
We were still releasing the lock though, leading to IllegalMonitorStateExceptions in FileCacheStoreVamTest:
2011-09-25 11:54:46,000 ERROR (testng-FileCacheStoreVamTest) [org.infinispan.test.fwk.UnitTestTestNGListener] Method testLoadAndStoreWithLifespan(org.infinispan.loaders.file.FileCacheStoreVamTest) threw an exception
java.lang.IllegalMonitorStateException
at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:398)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1340)
at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:778)
at org.infinispan.util.concurrent.locks.StripedLock.releaseLock(StripedLock.java:135)
at org.infinispan.loaders.LockSupportCacheStore.unlock(LockSupportCacheStore.java:87)
at org.infinispan.loaders.file.FileCacheStore.purgeInternal(FileCacheStore.java:244)
at org.infinispan.loaders.AbstractCacheStore$2.run(AbstractCacheStore.java:106)
at org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:48)
at org.infinispan.loaders.AbstractCacheStore.purgeExpired(AbstractCacheStore.java:103)
at org.infinispan.loaders.BaseCacheStoreTest.purgeExpired(BaseCacheStoreTest.java:198)
at org.infinispan.loaders.BaseCacheStoreTest.testLoadAndStoreWithLifespan(BaseCacheStoreTest.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:644)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:546)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:700)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1002)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:137)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:121)
at org.testng.TestRunner.runWorkers(TestRunner.java:909)
at org.testng.TestRunner.privateRun(TestRunner.java:618)
at org.testng.TestRunner.run(TestRunner.java:499)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:33)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:358)
at org.testng.internal.thread.ThreadUtil$CountDownLatchedRunnable.run(ThreadUtil.java:142)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] Created: (ISPN-1378) Log Infinispan version only once
by Michal Linhard (JIRA)
Log Infinispan version only once
--------------------------------
Key: ISPN-1378
URL: https://issues.jboss.org/browse/ISPN-1378
Project: Infinispan
Issue Type: Enhancement
Affects Versions: 5.0.0.FINAL
Reporter: Michal Linhard
Assignee: Manik Surtani
The log message with version
{code}
16:13:15,245 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-3) ISPN000128: Infinispan version: Infinispan 'Brahma' 5.1.0-SNAPSHOT
16:13:15,750 INFO [org.infinispan.factories.ComponentRegistry] (MSC service thread 1-2) ISPN000128: Infinispan version: Infinispan 'Brahma' 5.1.0-SNAPSHOT
16:13:16,302 INFO [org.infinispan.factories.ComponentRegistry] (MSC service thread 1-4) ISPN000128: Infinispan version: Infinispan 'Brahma' 5.1.0-SNAPSHOT
16:13:16,359 INFO [org.infinispan.factories.ComponentRegistry] (MSC service thread 1-3) ISPN000128: Infinispan version: Infinispan 'Brahma' 5.1.0-SNAPSHOT
16:13:16,705 INFO [org.infinispan.factories.ComponentRegistry] (MSC service thread 1-1) ISPN000128: Infinispan version: Infinispan 'Brahma' 5.1.0-SNAPSHOT
{code}
is logged in AbstractComponentRegistry and therefore it's logged for each configured cache.
Wouldn't one such message suffice for one CacheManager instance ?
e.g. log it at the end of GlobalComponentRegistry.start()
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] Created: (ISPN-1347) LIRS eviction not evicting correctly
by Jozef Vilkolak (JIRA)
LIRS eviction not evicting correctly
------------------------------------
Key: ISPN-1347
URL: https://issues.jboss.org/browse/ISPN-1347
Project: Infinispan
Issue Type: Bug
Components: Eviction
Affects Versions: 5.0.0.FINAL
Reporter: Jozef Vilkolak
Assignee: Manik Surtani
It seems LIRS eviction at this moment only evicts the first entry in the HIR queue and nothing else. I have written a test based on [this presentation|https://docs.google.com/viewer?a=v&q=cache:jcEF5qSkCo4J:www....] located in the eviction-strategy module of [edg-functional-tests|https://svn.devel.redhat.com/repos/jboss-qa/edg/edg-...] that is at the moment failing.
Upon closer examination I have found a couple of things I think may be the cause:
* in infinispan.util.concurrent.BoundedConcurrentHashMap
** in execute() of the LIRS eviction if you have more items in the accessQueue and while processing you choose an item to be evicted it is added to the evicted Set. But if it is still in the accessQueue(and the operation was put) it gets proccesed but in the end still ends up evicted because it was not removed from the evicted set.
** in onEntryMiss of the LIRS eviction the very first if shouldn't first increment currentLIRSize because otherwise LIRSize is never full and therefore the LIRS algorithm never truly happens because execute() is never called that's why it only evicts from the HIR queue. It also causes the cache to be able to hold only maxEntries-1 entries. Also if (queue.size() < hirSizeLimit) condition is true the item should also be added to the stack in order to track its recency. And lastly I don't think onEntryMiss should be evicting elements because that way we can't track their recency. They will get eventually evicted by pruning.
** the function onEntryRemove should not in my opinion remove entries from the stack because otherwise there is no way to track recency of HIR-nonresident blocks. They will eventually get removed from the stack by pruning. It also seems this function gets called when clearing the cache instead of clear.
* in Segment class
** the remove operation makes entries behave as if they were just added as is already documented there with a TODO
** the get operation calls onEntryHit which can cause problems if get is used while servicing a put operation because it gets called twice
If some of these things were design choices let me know so I will modify the test.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months