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, 2011-12-06 at 10:28 +0000, Sanne Grinovero wrote:
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 know how bad situation can get in practice; are you
seeing this happening very often, to the point that many empty buckets
might become inefficient usage of space or indexes in the store ? We
might think of clearing them in background, but creation would need to
be a blocking operation.
Sanne
On 6 December 2011 09:35, Martin Gencur <mgencur(a)redhat.com> wrote:
> 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/o...)
>
> 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
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/infinispan-dev
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Martin Gencur
--
JBoss QE, Enterprise Data Grid
Desk phone: +420 532 294 192, ext. 62192