<div class="gmail_quote">On Fri, Jun 15, 2012 at 9:18 AM, Bela Ban <span dir="ltr">&lt;<a href="mailto:bban@redhat.com" target="_blank">bban@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
<br>
On 6/14/12 7:43 PM, Mircea Markus wrote:<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt;&gt; From: &quot;Bela Ban&quot;&lt;<a href="mailto:bban@redhat.com">bban@redhat.com</a>&gt;<br>
&gt;&gt; To: <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; Sent: Thursday, June 14, 2012 7:20:31 AM<br>
&gt;&gt; Subject: [infinispan-dev] DIST, state transfer and cache loaders<br>
&gt;&gt;<br>
&gt;&gt; It occurred to me that I&#39;m not sure how state transfer happens in<br>
&gt;&gt; conjunction with cache loaders, can someone confirm that the<br>
&gt;&gt; statements<br>
&gt;&gt; below are correct / incorrect ?<br>
&gt;&gt; Cheers !<br>
&gt;&gt;<br>
&gt;&gt; - Say we have {A,B,C,D}, all nodes are configured with a disk-based<br>
&gt;&gt; (local) cache loader<br>
&gt;&gt;<br>
&gt;&gt; - Key K is mapped to A and B<br>
&gt;&gt;<br>
&gt;&gt; - After some idle time, K is evicted from A and B<br>
&gt;&gt;<br>
&gt;&gt; - Now B leaves<br>
&gt;&gt;<br>
&gt;&gt; - A state transfer of some keys (mapped to A) happens to B<br>
&gt;&gt;<br>
&gt; I imagine B resurrects at some point here?<br>
<br>
<br>
</div>Sorry, I meant a state transfer from A to C ! (B remains dead)<br>
<div class="im"><br>
<br>
&gt;  If not part of the state is transferred to C (and potentially D if<br>
virtual nodes are configured).<br>
&gt;&gt; - As part of the state transfer from A to B, do we iterate through<br>
&gt;&gt; the<br>
&gt;&gt; data stored in A&#39;s cache loader ?<br>
</div>&gt;&gt; Â  Â (Because if we only iterated through the in-memory data on A, we&#39;d<br>
<div class="im">&gt;&gt; not transfer K)<br>
&gt;<br>
&gt; yes if you have the fetchPersistentState=true.<br>
<br>
<br>
</div>Even for mode=DIST ?<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br><br>Yes, exactly the same in DIST and in REPL.<br><br>We first iterate over the data container, and we push all the entries there (for which we are the last old owner) to their new owners.<br>
Then we iterate over the cache store, ignoring the entries that are already in the data container, and do the same thing.<br><br>Cheers<br>Dan<br><br></div></div>