[infinispan-issues] [JBoss JIRA] (ISPN-3562) File cache store ignores maxEntries property

Martin Gencur (JIRA) jira-events at lists.jboss.org
Thu Sep 26 12:40:03 EDT 2013


     [ https://issues.jboss.org/browse/ISPN-3562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Gencur updated ISPN-3562:
--------------------------------

    Priority: Major  (was: Minor)

    
> 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
>             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.git;a=tree;f=remote/file-cache-store;h=0168fb920ff63de768bdc0ba7012fe1cd5d09409;hb=HEAD

--
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


More information about the infinispan-issues mailing list