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

2011-12-06 Thread Martin Gencur
I can't say how this will look in practice. You're right...if the creation operation is not cheap, it will be probably better to not delete buckets when they are empty but rather wait for the "purge" operation. The database can hold lots of entries and remain efficient anyway. Martin On Tue, 20

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

2011-12-06 Thread Manik Surtani
On 6 Dec 2011, at 10:28, Sanne Grinovero wrote: > We > might think of clearing them in background, but creation would need to > be a blocking operation. This is precisely what the reaper thread does when purging. -- Manik Surtani ma...@jboss.org twitter.com/maniksurtani Lead, Infinispan http:/

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

2011-12-06 Thread Sanne Grinovero
Hi Martin, I would expect that a bucket has a good likelihood to be reused, so that performance would be better to avoid both deletion and subsequent re-creation; concurrent creation might need a lock to ensure a single instance is created, so that's not a very cheap operation. That said, I don't

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

2011-12-06 Thread Martin Gencur
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/infinisp