[infinispan-issues] [JBoss JIRA] (ISPN-3407) Entry passivation doesn't work according to eviction strategy
Vitalii Chepeliuk (JIRA)
jira-events at lists.jboss.org
Wed Aug 14 04:23:26 EDT 2013
Vitalii Chepeliuk created ISPN-3407:
---------------------------------------
Summary: 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
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!
--
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