[infinispan-issues] [JBoss JIRA] (ISPN-4187) LRU eviction algorithm does not evict the eldest entry

RH Bugzilla Integration (JIRA) issues at jboss.org
Mon May 19 04:24:56 EDT 2014


    [ https://issues.jboss.org/browse/ISPN-4187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12968641#comment-12968641 ] 

RH Bugzilla Integration commented on ISPN-4187:
-----------------------------------------------

Martin Gencur <mgencur at redhat.com> changed the Status of [bug 1090591|https://bugzilla.redhat.com/show_bug.cgi?id=1090591] from ON_QA to VERIFIED

> LRU eviction algorithm does not evict the eldest entry
> ------------------------------------------------------
>
>                 Key: ISPN-4187
>                 URL: https://issues.jboss.org/browse/ISPN-4187
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Eviction
>    Affects Versions: 7.0.0.Alpha2
>            Reporter: Martin Gencur
>            Assignee: William Burns
>              Labels: 630betablocker
>             Fix For: 7.0.0.Alpha4
>
>         Attachments: server2.log
>
>
> The following test for JDBC cache stores fails:
> {code:java}
> @Test
>     @WithRunningServer({@RunningServer(name = CONTAINER1, config = CONFIG_FETCH_STATE_1)})
>     public void testFetchState() throws Exception {
>         try {
>             mc1 = createMemcachedClient(server1);
>             assertCleanCacheAndStore1();
>             mc1.set("k1", "v1");
>             mc1.set("k2", "v2");
>             mc1.set("k3", "v3");
>             assertNotNull(dbServer1.stringTable.getValueByKey("k1"));
>             startContainer(controller, CONTAINER2, CONFIG_FETCH_STATE_2);
>             mc2 = createMemcachedClient(server2);
>             assertTrue(0 < server2.getCacheManager(MANAGER_NAME).getCache(CACHE_NAME).getNumberOfEntries());
>             //the cache store should fetch state from the others
>             //since eviction.max-entries==2, first k2 and k3 is loaded from the other cache, then k1 is loaded
>             //from the other cache's loader and thus k2 is evicted and ends up in a cache loader
>             assertNull(dbServer2.stringTable.getValueByKey("k1"));
>             assertEquals("v1", mc2.get("k1"));
>             assertEquals("v2", mc2.get("k2"));
>             assertNull(dbServer2.stringTable.getValueByKey("k1"));
> //^^^^^fails here, the K1 was evicted even though it was used recently
> //K3 was supposed to be evicted but it did not happen
>             assertNull(dbServer2.stringTable.getValueByKey("k2"));
>             assertCleanCacheAndStore2();
>         } finally {
>             controller.stop(CONTAINER2);
>         }
>     }
> {code}
> This tests works properly if the following commit is reverted, so it was caused by this commit:
> https://github.com/infinispan/infinispan/commit/b190230d84beb41474bae0239c181a5f0e95f30c
> Note that there's another commit with the same name but different commit hash: b71da1c
> The test above can be run from https://github.com/chepa653/infinispan/tree/t_ISPN-3904 by going to server/integration/testsuite and running mvn clean verify -Dtest=StringBasedStoreMultinodeTest#testFetchState -Dlog.level.infinispan=TRACE



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the infinispan-issues mailing list