[infinispan-issues] [JBoss JIRA] (ISPN-3407) Entry passivation doesn't work according to eviction strategy

RH Bugzilla Integration (JIRA) jira-events at lists.jboss.org
Wed Aug 14 04:29:26 EDT 2013


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

RH Bugzilla Integration updated ISPN-3407:
------------------------------------------

        Bugzilla Update: Perform
    Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=996876

    
> Entry passivation doesn't work according to eviction strategy
> -------------------------------------------------------------
>
>                 Key: ISPN-3407
>                 URL: https://issues.jboss.org/browse/ISPN-3407
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Eviction
>    Affects Versions: 6.0.0.Alpha2
>            Reporter: Vitalii Chepeliuk
>            Assignee: Mircea Markus
>
> {code:title=Bar.java|borderStyle=solid}
>        GlobalConfiguration globalConf = new GlobalConfigurationBuilder().nonClusteredDefault().build();
>         ConfigurationBuilder builder = new ConfigurationBuilder();
>         builder.clustering().cacheMode(CacheMode.LOCAL)
>             .loaders().passivation(true).preload(false).shared(false)
>             .addLoader(JdbcStringBasedCacheStoreConfigurationBuilder.class).fetchPersistentState(false).purgeOnStartup(false)
>             .table()
>                 .databaseType(DatabaseType.MYSQL)
>                 .dropOnExit(false)
>                 .createOnStart(true)
>                 .tableNamePrefix("ISPN6Alpha2_STRING")
>                 .idColumnName("ID").idColumnType("VARCHAR(255)")
>                 .dataColumnName("DATA").dataColumnType("VARBINARY(1000)")
>                 .timestampColumnName("TIMESTAMP").timestampColumnType("BIGINT")
>             .connectionPool()
>                 .connectionUrl()
>                 .username("username")
>                 .password("password")
>                 .driverClass("com.mysql.jdbc.Driver")
>             .eviction().strategy(EvictionStrategy.LRU).maxEntries(2);
>         Configuration localConf = builder.build();
>         DefaultCacheManager defCacheManager = new DefaultCacheManager(globalConf, localConf, true);
> 		  Cache<String, String> cache = defCacheManager.getCache();
> 		  cache.put("k1", "v1");
>         cache.put("k2", "v2");
>         //not yet in store (eviction.max-entries=2, LRU)
> 		  cache.put("k3", "v3");
>         assertEquals("v3", cache.get("k3"));
>         //now k1 evicted and stored in store
>         assertEquals(2, cache.size()); <<< only 2 entries should remain in cache, k1 should be passivated and removed. But doesn't work!
> {code} 

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