-
Bug
-
Resolution: Done
-
Critical
-
5.1.2.FINAL
-
None
Using the following java (see Test.java):
public static void main(String[] args) throws Exception {
DefaultCacheManager manager = new DefaultCacheManager("config/config.xml");
Cache<String, String> cache = manager.getCache("evictionCache");
for (int i = 0; i < 10000; i++)
{ cache.put("key" + i, "value" + i); } cache.stop();
manager.stop();
}
with the following config (see config.xml):
<infinispan>
<namedCache name="evictionCache">
<loaders passivation="false" shared="false" preload="true">
<loader class="org.infinispan.loaders.file.FileCacheStore"
fetchPersistentState="true" ignoreModifications="false"
purgeOnStartup="false">
<properties>
<property name="location" value="d:\code\infinispan\store" />
</properties>
</loader>
</loaders>
<eviction maxEntries="5000" strategy="LRU" />
<expiration lifespan="60000" maxIdle="10000" wakeUpInterval="500" />
</namedCache>
</infinispan>
running under Windows 7, there are two problems:
1) There are lots INFO: Unable to remove empty file
d:\code\infinispan\store\evictionCache-1134715904 - will try again
later. I'm running under windows, so this may have something to do
with it, but the process which is holding on to the file handles is
the jvm. Is it possible that something somewhere is holding the files
open somewhere? Looking at the code in FileCacheStore, there doesn't
seem to be anything obvious.
2) This may be related to the above, but the process eventually falls
over with java.nio.channels.ClosedByInterruptException (with
iterations = 1000) see console-1000.txt or a java.io.EOFException: The
stream ended unexpectedly. for iterations = 10000 (see
console-10000.txt).