]
RH Bugzilla Integration commented on ISPN-3562:
-----------------------------------------------
Martin Gencur <mgencur(a)redhat.com> made a comment on [bug
File cache store ignores maxEntries property
--------------------------------------------
Key: ISPN-3562
URL:
https://issues.jboss.org/browse/ISPN-3562
Project: Infinispan
Issue Type: Bug
Components: Server
Affects Versions: 6.0.0.Beta1
Reporter: Martin Gencur
Assignee: Mircea Markus
Priority: Minor
Fix For: 6.0.0.Final
The following test fails if the new file cache store is configured with maxEntries
property:
{code:java}
@Test
public void testMaxEntriesAndLocationParametersDuringRestart() throws Exception {
controller.start(CONTAINER);
RemoteCacheManager rcm = new RemoteCacheManager(new
ConfigurationBuilder().addServer()
.host(server.getHotrodEndpoint().getInetAddress().getHostName())
.port(server.getHotrodEndpoint().getPort())
.build());
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"));
//assert the existence of a single file in the filesystem
File f = new File(singleFCSPath, "default.dat");
assertTrue(f.exists());
//assert that SingleFileCacheStore was registered
MBeanServerConnectionProvider provider = new
MBeanServerConnectionProvider(server.getHotrodEndpoint().getInetAddress().getHostName(),
MANAGEMENT_PORT);
assertEquals("[org.infinispan.persistence.file.SingleFileStore]",
getAttribute(provider, CACHE_LOADER_MBEAN, "stores"));
controller.kill(CONTAINER);
controller.start(CONTAINER);
assertEquals("v2", rc.get("k2"));
assertEquals("v3", rc.get("k3"));
assertNull(rc.get("k1")); //maxEntries was 2, this entry should be lost
as the oldest entries are removed
//^^^^fails here, the entry is still there
controller.stop(CONTAINER);
}
{code}
Cache configuration:
{code}
<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"/>
<file-store
passivation="false"
preload="false"
purge="false"
relative-to="temp"
path="single-file-cache-store"
>
<property name="maxEntries">2</property>
</file-store>
</local-cache>
</cache-container>
</subsystem>
{code}
The complete test is here:
https://code.engineering.redhat.com/gerrit/gitweb?p=jdg-functional-tests....
--
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: