<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2018-03-01 16:36 GMT+01:00 Tristan Tarrant <span dir="ltr">&lt;<a href="mailto:ttarrant@redhat.com" target="_blank">ttarrant@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You need to use the brand new CacheAdmin API:<br>
<br>
<a href="http://infinispan.org/docs/stable/user_guide/user_guide.html#obtaining_caches" rel="noreferrer" target="_blank">http://infinispan.org/docs/<wbr>stable/user_guide/user_guide.<wbr>html#obtaining_caches</a></blockquote><div><br></div><div>I&#39;ll look into that for Vert.x 3.6 which will be based on Infinispan 9.2.<br><br></div>Is there any way to achieve these goals with 9.1.x?<br><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
<br>
Tristan<br>
<div><div class="h5"><br>
On 3/1/18 4:30 PM, Thomas SEGISMONT wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; This email follows up on my testing of the Infinispan Cluster Manager<br>
&gt; for Vert.x on Kubernetes.<br>
&gt;<br>
&gt; In one of the tests, we want to make sure that, after a rolling update<br>
&gt; of the application, the data submitted to Vert.x&#39; AsyncMap is still<br>
&gt; present. And I found that when the underlying cache is predefined in<br>
&gt; infinispan.xml, the data is present, otherwise it&#39;s not.<br>
&gt;<br>
&gt; I pushed a simple reproducer on GitHub:<br>
&gt; <a href="https://github.com/tsegismont/cachedataloss" rel="noreferrer" target="_blank">https://github.com/tsegismont/<wbr>cachedataloss</a><br>
&gt;<br>
&gt; The code does this:<br>
&gt; - a first node is started, and creates data<br>
&gt; - new nodes are started, but they don&#39;t invoke cacheManager.getCache<br>
&gt; - the initial member is killed<br>
&gt; - a &quot;testing&quot; member is started, printing out the data in the console<br>
&gt;<br>
&gt; Here are my findings.<br>
&gt;<br>
&gt; 1/ Even when caches are declared in infinispan.xml, the data is lost<br>
&gt; after the initial member goes away.<br>
&gt;<br>
&gt; A little digging showed that the caches are really distributed only<br>
&gt; after you invoke cacheManager.getCache<br>
&gt;<br>
&gt; 2/ Checking cluster status &quot;starts&quot; triggers distribution<br>
&gt;<br>
&gt; I was wondering why the behavior was not the same as with my Vert.x<br>
&gt; testing on Openshift. And then realized the only difference was the<br>
&gt; cluster readiness check, which reads the cluster health. So I updated<br>
&gt; the reproducer code to add such a check (still without invoking<br>
&gt; cacheManager.getCache). Then the caches defined in infinispan.xml have<br>
&gt; their data distributed.<br>
&gt;<br>
&gt; So,<br>
&gt;<br>
&gt; 1/ How can I make sure caches are distributed on all nodes, even if some<br>
&gt; nodes never try to get a reference with cacheManager.getCache, or don&#39;t<br>
&gt; check cluster health?<br>
&gt; 2/ Are we doing something wrong with our way to declare the default<br>
&gt; configuration for caches [1][2]?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Thomas<br>
&gt;<br>
&gt; [1]<br>
&gt; <a href="https://github.com/tsegismont/cachedataloss/blob/master/src/main/resources/infinispan.xml#L10" rel="noreferrer" target="_blank">https://github.com/tsegismont/<wbr>cachedataloss/blob/master/src/<wbr>main/resources/infinispan.xml#<wbr>L10</a><br>
&gt; [2]<br>
&gt; <a href="https://github.com/tsegismont/cachedataloss/blob/master/src/main/resources/infinispan.xml#L22" rel="noreferrer" target="_blank">https://github.com/tsegismont/<wbr>cachedataloss/blob/master/src/<wbr>main/resources/infinispan.xml#<wbr>L22</a><br>
&gt;<br>
</div></div>&gt; ______________________________<wbr>_________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/infinispan-<wbr>dev</a><br>
&gt;<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Tristan Tarrant<br>
Infinispan Lead and Data Grid Architect<br>
JBoss, a division of Red Hat<br>
______________________________<wbr>_________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/infinispan-<wbr>dev</a><br>
</font></span></blockquote></div><br></div></div>