[infinispan-dev] Bucket-based cache stores not removing buckets when they're empty

Martin Gencur mgencur at redhat.com
Tue Dec 6 04:35:07 EST 2011


I found out through our tests that bucket-based cache stores
(JdbcBinaryCacheStore and FileCacheStore) are not removing buckets (this
is either a database table row or a file) when they remove last
entry from the bucket and they remain empty in the database/filesystem.

(https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/loaders/bucket/BucketBasedCacheStore.java#L105)

Buckets are removed only when the cache store is purged (purge
attribute==true) so when the purge attribute is not set then the number
of buckets will only grow.

Shouldn't we change this to remove buckets when removing last entry from
them?


Thanks for any thoughts



-- 
Martin Gencur
--
JBoss QE, Enterprise Data Grid
Desk phone: +420 532 294 192, ext. 62192



More information about the infinispan-dev mailing list