<div dir="ltr">Ok, I&#39;ve read the code now. (It&#39;s been a long time!)<div><br></div><div>The partial updates should only be sent if there is a mismatch between the current CH and the topology cache (i.e. one of the owners in the CH doesn&#39;t have an endpoint address in the topology cache) and the client has a really old CH (i.e. client topology id + 1 &lt; server topology id, e.g. because this is the client&#39;s first request). in this case, we send a topology update to the client, even though we know it will be updated soon, but the server must prune all the owners without a valid endpoint address from the CH sent to the client (as per your second proposal).</div>

<div><br></div><div>Cheers</div><div>Dan</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 28, 2014 at 3:31 PM, Dan Berindei <span dir="ltr">&lt;<a href="mailto:dan.berindei@gmail.com" target="_blank">dan.berindei@gmail.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 dir="ltr"><div>Do we really need to send those partial topology updates? What topology id do they have?</div><div>

<br></div><div>When the coordinator sees the leaver, it updates the consistent hashes on all the members and increases the cache topology id. Normally this is immediately followed by a new topology update that starts a rebalance, but if there is just one node left in the cluster there is nothing to rebalance and this will be the last topology sent to the client. If we already sent a partial topology to the client with that id, we&#39;ll never update the CH on the client.</div>


<div><br></div><div>Cheers</div><span class="HOEnZb"><font color="#888888"><div>Dan</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 28, 2014 at 3:20 PM, Galder Zamarreño <span dir="ltr">&lt;<a href="mailto:galder@redhat.com" target="_blank">galder@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">Hey Dan,<br>
<br>
Re: <a href="https://issues.jboss.org/browse/ISPN-4674" target="_blank">https://issues.jboss.org/browse/ISPN-4674</a><br>
<br>
If you remember, the topology updates that we send to clients are sometimes partial. This happens when at the JGroups level we have a new view, but the HR address cache has not yet been updated with the JGroups address to endpoint address. This logic works well with HR protocol 1.x.<br>



<br>
With HR 2.x, there’s a slight problem with this. The problem is that we now write segment information in the topology, and when we have this partial set up, calls to locateOwnersForSegment(), for a partial cluster of 2, it can quite possibly return 2.<br>



<br>
The problem comes when the client reads the number of servers, discovers it’s one, but reading the segment, it says that there’s two owners. That’s where the ArrayIndexOutOfBoundsException comes from.<br>
<br>
The question is: how shall we deal with this segment information in the even of a partial topology update?<br>
<br>
&gt;From a client perspective, one option might be to just ignore those segment positions for which there’s no cluster member. IOW, if the number of owners is bigger than the cluster view, it could just decide to create a smaller segment array, of only cluster view size, and then ignore the index of a node that’s not present in the cluster view.<br>



<br>
Would this be the best way to solve it? Or could we just avoid sending segment information that’s not right? IOW, directly send from the server segment information with all this filtered.<br>
<br>
Thoughts?<br>
<br>
Cheers,<br>
--<br>
Galder Zamarreño<br>
<a href="mailto:galder@redhat.com" target="_blank">galder@redhat.com</a><br>
<a href="http://twitter.com/galderz" target="_blank">twitter.com/galderz</a><br>
<br>
<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>