Ok, I have something weird in CacheLoaderInterceptor :<div><br></div><div>When I read the same entry, again and again, I end up in loadIfNeeded.</div><div>Each time, the entry is loaded from the cachestore @  InternalCacheEntry loaded = loader.load(key);</div>
<div>At the end of the method, once we load the entry and wrap it, there is a call to putLoadedEntryInContainer.</div><div><br></div><div>The weird thing is that putLoadedEntryInContainer does not put anything in anything... :</div>
<div><br></div><div><div> private MVCCEntry putLoadedEntryInContainer(InvocationContext ctx, Object key, MVCCEntry entry, InternalCacheEntry loadedEntry) throws Exception {</div><div>      boolean entryExists = (loadedEntry != null);</div>
<div>      if (log.isTraceEnabled()) log.trace(&quot;Entry exists in loader? &quot; + entryExists);</div><div><br></div><div>      if (getStatisticsEnabled()) {</div><div>         if (entryExists) {</div><div>            cacheLoads.incrementAndGet();</div>
<div>         } else {</div><div>            cacheMisses.incrementAndGet();</div><div>         }</div><div>      }</div><div><br></div><div>      if (entryExists) {</div><div>         sendNotification(key, true, ctx);</div>
<div>         entry.setValue(loadedEntry.getValue());</div><div>         entry.setLifespan(loadedEntry.getLifespan());</div><div>         entry.setMaxIdle(loadedEntry.getMaxIdle());</div><div>         // TODO shouldn&#39;t we also be setting last used and created timestamps?</div>
<div>         entry.setValid(true);</div><div><br></div><div>         notifier.notifyCacheEntryLoaded(key, false, ctx);</div><div>         sendNotification(key, false, ctx);</div><div>      }</div><div><br></div><div>      return entry;</div>
<div>   }</div><div><br></div><div><br></div><div>So it looks obvious that the entry is not stored...</div><div><br></div><div>What am I missing ?</div><div><br></div><div>Cheers,</div><div><br></div><div>phil</div><br><div class="gmail_quote">
---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Philippe Van Dyck</b> <span dir="ltr">&lt;<a href="mailto:pvdyck@gmail.com">pvdyck@gmail.com</a>&gt;</span><br>Date: Mon, Apr 19, 2010 at 7:26 PM<br>
Subject: Am I missing something ?<br>To: infinispan -Dev List &lt;<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a>&gt;<br><br><br>Hi All,<div><br></div><div>just a quick question.. what could motivate Infinispan to check my store *each* time I get an entry from the its cache ??</div>
<div><br></div><div>While I was debugging the BlobCacheStore I noticed that all my &#39;get&#39; endend up in a decompression of an entry downloaded from S3...</div>
<div><br></div><div>Did I miss somthing in my config ?:</div><div><br></div><div>1) jgroups as transport</div><div>2) jmx enabled</div><div>3) transaction enabled (Atomikos)</div><div>4) distribution mode</div><div>5) l1 enabled</div>

<div>6) two owners (actually only one alive... does this have an impact ?)</div><div>7) no passivation </div><div>8) cache is shared</div><div>9) cache is no preloaded </div><div>10) then the config for the cache store</div>

<div>11) eviction manual (my own)</div><div>12) one minute max locking</div><div><br></div><div>And *each* time I &#39;get&#39; something from the cache... it goes to the store.</div><div><br></div><div>I must be missing something ;-)</div>

<div><br></div><div>phil</div><div><br></div><div><div>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</div><div><br></div><div>&lt;infinispan xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;</div>

<div><span style="white-space:pre">        </span>xmlns=&quot;urn:infinispan:config:4.0&quot;&gt;</div><div><span style="white-space:pre">        </span>&lt;global&gt;</div><div><span style="white-space:pre">                </span>&lt;transport</div>

<div><span style="white-space:pre">                        </span>transportClass=&quot;org.infinispan.remoting.transport.jgroups.JGroupsTransport&quot;&gt;</div><div><span style="white-space:pre">                        </span>&lt;properties&gt;</div>
<div><span style="white-space:pre">                                </span>&lt;property name=&quot;configurationFile&quot; value=&quot;jgroups.xml&quot; /&gt;</div><div><span style="white-space:pre">                        </span>&lt;/properties&gt;</div>
<div><span style="white-space:pre">                </span>&lt;/transport&gt;</div><div><span style="white-space:pre">                </span>&lt;globalJmxStatistics enabled=&quot;true&quot; /&gt;</div><div>
<span style="white-space:pre">        </span>&lt;/global&gt;</div><div><br></div><div><br></div><div><br></div><div><span style="white-space:pre">        </span>&lt;namedCache name=&quot;qi4j&quot;&gt;</div>
<div><span style="white-space:pre">                </span>&lt;jmxStatistics enabled=&quot;true&quot; /&gt;</div><div><span style="white-space:pre">                </span>&lt;transaction</div><div><span style="white-space:pre">                        </span>transactionManagerLookupClass=&quot;org.qi4j.entitystore.s3jclouds.AtomikosTransactionManagerLookup&quot; /&gt;</div>

<div><span style="white-space:pre">                </span>&lt;clustering mode=&quot;distribution&quot;&gt;</div><div><span style="white-space:pre">                        </span>&lt;l1 enabled=&quot;true&quot; lifespan=&quot;100000&quot; /&gt;</div>
<div><span style="white-space:pre">                        </span>&lt;hash numOwners=&quot;2&quot; rehashRpcTimeout=&quot;120000&quot; /&gt;</div><div><span style="white-space:pre">                </span>&lt;/clustering&gt;</div>
<div><br></div><div><span style="white-space:pre">                </span>&lt;loaders passivation=&quot;false&quot; shared=&quot;true&quot; preload=&quot;false&quot;&gt;</div><div><br></div><div><span style="white-space:pre">                        </span>&lt;loader</div>

<div><span style="white-space:pre">                                </span>class=&quot;org.qi4j.entitystore.s3jclouds.cacheStore.Bzip2CloudCacheStore&quot;</div><div><span style="white-space:pre">                                </span>fetchPersistentState=&quot;false&quot; ignoreModifications=&quot;false&quot;</div>

<div><span style="white-space:pre">                                </span>purgeOnStartup=&quot;false&quot; purgeSynchronously=&quot;true&quot;&gt;</div><div><br></div><div><span style="white-space:pre">                                </span>&lt;properties&gt;</div>
<div><span style="white-space:pre">                                        </span>&lt;property name=&quot;identity&quot; value=&quot;nahnah&quot; /&gt;</div><div><span style="white-space:pre">                                        </span>&lt;property name=&quot;password&quot; value=&quot;nah&quot; /&gt;</div>

<div><span style="white-space:pre">                                        </span>&lt;property name=&quot;bucketPrefix&quot; value=&quot;storetest2&quot; /&gt;</div><div><span style="white-space:pre">                                        </span>&lt;property name=&quot;cloudService&quot; value=&quot;s3&quot; /&gt;</div>

<div><span style="white-space:pre">                                </span>&lt;/properties&gt;</div><div><span style="white-space:pre">                        </span>&lt;/loader&gt;</div><div><span style="white-space:pre">                </span>&lt;/loaders&gt;</div>
<div><br></div><div><span style="white-space:pre">                </span>&lt;!--</div><div><span style="white-space:pre">                        </span>&lt;deadlockDetection enabled=&quot;true&quot;</div><div><span style="white-space:pre">                        </span>spinDuration=&quot;1000&quot;&gt;&lt;/deadlockDetection&gt;</div>

<div><span style="white-space:pre">                </span>--&gt;</div><div><span style="white-space:pre">                </span>&lt;eviction strategy=&quot;LRU&quot; wakeUpInterval=&quot;-1&quot; maxEntries=&quot;1&quot; /&gt;</div>
<div><br></div><div><span style="white-space:pre">                </span>&lt;locking lockAcquisitionTimeout=&quot;60000&quot; concurrencyLevel=&quot;32&quot; /&gt;</div><div><br></div><div><br></div><div><br></div>
<div><span style="white-space:pre">                </span>&lt;unsafe unreliableReturnValues=&quot;true&quot; /&gt;</div><div><br></div><div><span style="white-space:pre">        </span>&lt;/namedCache&gt;</div>
<div>&lt;/infinispan&gt;</div></div><div><br></div><div><br></div><div><br></div>
</div><br></div>