<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">@Bela: is there a config way to make this JGroups backend wait for ACK?<div><br></div><div>-Ales<br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Emmanuel Bernard &lt;<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>&gt;<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>Re: [infinispan-dev] query npe</b><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">April 10, 2013 2:06:20 PM GMT+02:00<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>To: </b></span><span style="font-family:'Helvetica'; font-size:medium;">infinispan -Dev List &lt;<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a>&gt;<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Reply-To: </b></span><span style="font-family:'Helvetica'; font-size:medium;">infinispan -Dev List &lt;<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a>&gt;<br></span></div><br><div>Dan worked to understand the problem, here is where we stand without<br>Sanne's additional knowledge.<br><br>The test failing is the following:<br><br> &nbsp;&nbsp;&nbsp;tx1.start();<br> &nbsp;&nbsp;&nbsp;cache.remove(key);<br> &nbsp;&nbsp;&nbsp;tx1.commit();<br> &nbsp;&nbsp;&nbsp;assert queryDeletedKey.getResults().size() == 0;<br><br>Surprisingly, the entity is still found in the query and Infinispan<br>Query returns `null`.<br><br>The reason we suspect is the following. While pushing the index changes<br>is done in sync with the transaction commit (tx sync), the backend is<br>JGroups and returns right after it has sent the message to the master<br>node without waiting for the index ack.<br>This is a good thing as it scales much better but has the nice<br>side effect of returning incorrect query results right after a change<br>set is applied (indexing window + index propagation).<br><br>My recommendation is to make sure Infinispan Query removes entities<br>found by the query engine but not present in the grid like we do in<br>Hibernate Search for the ORM case. Note that this does not solve the<br>case were you add a new entity and expect to query it *right after the<br>commit*. There is a similar issue around entity changes. If CapeDwarf<br>can live with it it will be better off.<br><br>An alternative solution would be to create a JGroups backend that waits<br>for an execution ACK before giving back the had to the client but that<br>will have scalability problems.<br><br>Emmanuel<br><br>On Tue 2013-04-09 23:41, Ales Justin wrote:<br><blockquote type="cite">Chasing down today's NPE: <a href="http://pastie.org/7382216">http://pastie.org/7382216</a><br><br>I've added this test:<br>* <a href="https://github.com/capedwarf/capedwarf-blue/commit/d416d5358">https://github.com/capedwarf/capedwarf-blue/commit/d416d5358</a><br><br>The test fails. ;-)<br><br>deleteAndQueryInA(org.jboss.test.capedwarf.cluster.test.QueryTest): Should not be here: null<br><br>This is the "null" that is the cause of top NPE.<br><br>-Ales<br><br></blockquote><br><blockquote type="cite">_______________________________________________<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<br></blockquote><br>_______________________________________________<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<br></div></blockquote></div><br></div></body></html>