]
Mircea Markus updated ISPN-3348:
--------------------------------
Assignee: Mircea Markus (was: Galder ZamarreƱo)
Unable to read entries from SingleFileCacheStore after server
restart
---------------------------------------------------------------------
Key: ISPN-3348
URL:
https://issues.jboss.org/browse/ISPN-3348
Project: Infinispan
Issue Type: Bug
Components: Server
Affects Versions: 6.0.0.Alpha1
Reporter: Martin Gencur
Assignee: Mircea Markus
Priority: Critical
Labels: jdg62blocker
Fix For: 6.0.0.Beta2
Using the following configuration:
{code:xml}
<subsystem xmlns="urn:infinispan:server:core:5.3"
default-cache-container="default">
<cache-container name="default"
default-cache="default" listener-executor="infinispan-listener"
eviction-executor="infinispan-eviction"
replication-queue-executor="infinispan-repl-queue">
<local-cache name="default" start="EAGER">
<locking isolation="NONE"
acquire-timeout="30000" concurrency-level="1000"
striping="false"/>
<transaction mode="NONE"/>
<store
class="org.infinispan.loaders.file.SingleFileCacheStore"
passivation="false" preload="false" purge="false">
<property
name="location">${java.io.tmpdir}/single-file-cache-store</property>
<property name="maxEntries">2</property>
</store>
</local-cache>
</cache-container>
</subsystem>
{code}
...it is not possible to retrieve the cache entry from the cache store after server
restart, as demonstrated by the following test:
{code:java}
RemoteCache<String, String> rc = rcm.getCache();
rc.clear();
assertNull(rc.get("k1"));
rc.put("k1", "v1");
rc.put("k2", "v2");
rc.put("k3", "v3");
assertEquals("v1", rc.get("k1"));
assertEquals("v2", rc.get("k2"));
assertEquals("v3", rc.get("k3"));
controller.kill(CONTAINER);
controller.start(CONTAINER);
assertEquals("v2", rc.get("k2"));
//^^^fails here - unable to find k2
assertEquals("v3", rc.get("k3"));
assertNull(rc.get("k1")); //maxEntries was 2, this entry should be lost
as the oldest entries are removed
controller.stop(CONTAINER);
{code}
Note that preload is set to false for this test. When I set it to true, the test passes.
I tried to modify BaseCacheStoreFunctionalTest#testPreloadAndExpiry, disable
"preload" and retrieve the cache entries after server restart by calling
cache.get() (not from DataContainer) and the test passed (I ran
SingleFileCacheStoreFunctionalTest which extends BaseCacheStoreFunctionalTest). So it
seems the bug is related to the server distribution.
--
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: