Amit_Hora
Amit_Hora

Reputation: 708

Infinispan File Cache Store size Increases after multiple puts

I am using LevelDB as CacheStore for Infinispan 6.0.2 Final but facing some issues.Please find below code used to get cache

  ConfigurationBuilder config = new ConfigurationBuilder();
      LevelDBStore strgBuilder = new LevelDBStore();
      ConfigurationBuilder b = new ConfigurationBuilder();

      b.persistence()
       .addStore(LevelDBStoreConfigurationBuilder.class).location("/home/tmpstore200").expiredLocation("/home/tmpexpiredlocation200").expiryQueueSize(10);
       b.eviction().strategy(EvictionStrategy.LIRS).maxEntries(8).expiration().wakeUpInterval(10000l).reaperEnabled(true);

    b.jmxStatistics().enabled(true);

1)Doing multiple puts on same key leads to increase in size of store

for(int i=0;i<100;i++)
 c.put("k"+i,i);

Running above loop once results in size of cache Store=128KB Running above loop again results in cache store size increase by 10kb Running it again results in cache store size to 155KB

I am unable to find any reason for increase in cache store size while writing the same key,value again and again

Upvotes: 0

Views: 154

Answers (1)

Dan Berindei
Dan Berindei

Reputation: 7194

It's because LevelDB doesn't overwrite entries.

Upvotes: 2

Related Questions