<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">WTF! &nbsp;You're right - I'll investigate this in detail. &nbsp;Thanks for spotting/reporting. &nbsp;Care to raise a JIRA?<div><br><div><div>On 20 Apr 2010, at 14:03, Philippe Van Dyck wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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 @&nbsp;&nbsp;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&nbsp;putLoadedEntryInContainer.</div><div><br></div><div>The weird thing is that&nbsp;putLoadedEntryInContainer does not put anything in anything... :</div>
<div><br></div><div><div>&nbsp;private MVCCEntry putLoadedEntryInContainer(InvocationContext ctx, Object key, MVCCEntry entry, InternalCacheEntry loadedEntry) throws Exception {</div><div>&nbsp;&nbsp; &nbsp; &nbsp;boolean entryExists = (loadedEntry != null);</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp;if (log.isTraceEnabled()) log.trace("Entry exists in loader? " + entryExists);</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;if (getStatisticsEnabled()) {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; if (entryExists) {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cacheLoads.incrementAndGet();</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; } else {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cacheMisses.incrementAndGet();</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp;&nbsp; &nbsp; &nbsp;}</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;if (entryExists) {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; sendNotification(key, true, ctx);</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; entry.setValue(loadedEntry.getValue());</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; entry.setLifespan(loadedEntry.getLifespan());</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; entry.setMaxIdle(loadedEntry.getMaxIdle());</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; // TODO shouldn't we also be setting last used and created timestamps?</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; entry.setValid(true);</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; notifier.notifyCacheEntryLoaded(key, false, ctx);</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; sendNotification(key, false, ctx);</div><div>&nbsp;&nbsp; &nbsp; &nbsp;}</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;return entry;</div>
<div>&nbsp;&nbsp; }</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 'get' 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&nbsp;</div><div>8) cache is shared</div><div>9) cache is no preloaded&nbsp;</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 'get' 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="1.0" encoding="UTF-8"?&gt;</div><div><br></div><div>&lt;infinispan xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"</div>

<div><span style="white-space:pre">        </span>xmlns="urn:infinispan:config:4.0"&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="org.infinispan.remoting.transport.jgroups.JGroupsTransport"&gt;</div><div><span style="white-space:pre">                        </span>&lt;properties&gt;</div>
<div><span style="white-space:pre">                                </span>&lt;property name="configurationFile" value="jgroups.xml" /&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="true" /&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="qi4j"&gt;</div>
<div><span style="white-space:pre">                </span>&lt;jmxStatistics enabled="true" /&gt;</div><div><span style="white-space:pre">                </span>&lt;transaction</div><div><span style="white-space:pre">                        </span>transactionManagerLookupClass="org.qi4j.entitystore.s3jclouds.AtomikosTransactionManagerLookup" /&gt;</div>

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

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

<div><span style="white-space:pre">                                </span>purgeOnStartup="false" purgeSynchronously="true"&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="identity" value="nahnah" /&gt;</div><div><span style="white-space:pre">                                        </span>&lt;property name="password" value="nah" /&gt;</div>

<div><span style="white-space:pre">                                        </span>&lt;property name="bucketPrefix" value="storetest2" /&gt;</div><div><span style="white-space:pre">                                        </span>&lt;property name="cloudService" value="s3" /&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="true"</div><div><span style="white-space:pre">                        </span>spinDuration="1000"&gt;&lt;/deadlockDetection&gt;</div>

<div><span style="white-space:pre">                </span>--&gt;</div><div><span style="white-space:pre">                </span>&lt;eviction strategy="LRU" wakeUpInterval="-1" maxEntries="1" /&gt;</div>
<div><br></div><div><span style="white-space:pre">                </span>&lt;locking lockAcquisitionTimeout="60000" concurrencyLevel="32" /&gt;</div><div><br></div><div><br></div><div><br></div>
<div><span style="white-space:pre">                </span>&lt;unsafe unreliableReturnValues="true" /&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>
_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/infinispan-dev</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div>Lead, Infinispan</div><div>Lead, JBoss Cache</div><div><a href="http://www.infinispan.org">http://www.infinispan.org</a></div><div><a href="http://www.jbosscache.org">http://www.jbosscache.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>