[infinispan-dev] cache loader: purgerThreads and purgeSynchronously

Radim Vansa rvansa at redhat.com
Wed Aug 14 07:27:17 EDT 2013


It seems to me that these attributes may not be common to all cache 
stores. For some stores, the purging can be executed as part of other 
process anyway and it is not desired to purge the store on-demand. Some 
stores may not be able to purge in parallel at all (for example some 
single-file store where you just can't jump in the middle of file) or 
would be highly inefficient. Rather than emitting warning upon improper 
configuration, I'd let these parameters to implementation and make the 
purging service optional.

Radim

On 08/14/2013 12:59 PM, Mircea Markus wrote:
> Hi,
>
> I'm not sure these config attributes are needed.
>
> - *purgeThreads*  configures the number of threads that run the storage purging (removal of expired entries from the storage). The more threads the faster the purging processes. Is there a reason for putting effort in making the purging fast (and parallel) though? The cache store implementations check if an entry is expired before returning it anyway. Actually I'll move the code in CacheLoader interceptor to make sure this happens for all stores.
> - *purgeSynchronously*. I think the reason for this parameter is that the purging is invoked by the eviction thread. If the purging takes long then eviction is delayed. This is false by default (I doubt users change this btw) so there's a different thread than the eviction thread that runs the purging. I'd rather remove the config option and always run the purging in its own thread.
>
> Opinions?
>
> Cheers,



More information about the infinispan-dev mailing list