[infinispan-dev] LevelDBStore's expiryEntryQueue

Dan Berindei dan.berindei at gmail.com
Mon Jul 7 04:06:23 EDT 2014


On Fri, Jul 4, 2014 at 6:09 PM, Pedro Ruivo <pedro at infinispan.org> wrote:

> Hi guys,
>
> Is there a way to replace the expiryEntryQueue with a non-blocking
> structure?
>
>
Did you try configuring levelDBStore.expiryQueueSize = MAX_INT?


> Long history:
>
> In high throughput systems, this queue gets full very often and it is
> blocking all the writes (that throws timeout exceptions everywhere).
>
> Also, I don't full understand why this queue exists. It is drain in
> purgeExpired and it deletes the keys expired, but the not-expires keys
> are never tested (or I am missing something)
>

> Can someone explains?
>

AFAICT the idea is to store the expiration time of each key in a separate
DB, so that purging the expired entries doesn't require reading all the
values from the regular DB. The regular DB still contains the expiration
time, so the regular expiration check still works.

Note that the purge method iterates over all the entries in the expired DB,
not just the entries in the expiration queue.

The expiration queue is needed so that we don't have 2 sync LevelDB writes
for every Infinispan write. But I don't see any reason for it to be tied to
the purge() method - instead, another thread should constantly read entries
out of the expiration queue and write them to the expiration DB.

Cheers
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20140707/2132e476/attachment.html 


More information about the infinispan-dev mailing list