<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 4, 2014 at 6:09 PM, Pedro Ruivo <span dir="ltr"><<a href="mailto:pedro@infinispan.org" target="_blank">pedro@infinispan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi guys,<br>
<br>
Is there a way to replace the expiryEntryQueue with a non-blocking<br>
structure?<br>
<br></blockquote><div><br></div>Did you try configuring levelDBStore.expiryQueueSize = MAX_INT?<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Long history:<br>
<br>
In high throughput systems, this queue gets full very often and it is<br>
blocking all the writes (that throws timeout exceptions everywhere).<br>
<br>
Also, I don't full understand why this queue exists. It is drain in<br>
purgeExpired and it deletes the keys expired, but the not-expires keys<br>
are never tested (or I am missing something)<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Can someone explains?<br></blockquote><div><br></div><div>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.</div>
<div><br></div><div>Note that the purge method iterates over all the entries in the expired DB, not just the entries in the expiration queue. </div><div><br></div><div>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.</div>
<div></div></div><br></div><div class="gmail_extra">Cheers</div><div class="gmail_extra">Dan</div><div class="gmail_extra"><br></div></div>