<p dir="ltr">A lot to read through here so I apologize up front if I missed something...</p>
<p dir="ltr">So to be fair I am biased as I would really like to not have to deal with these integrations :)  That said, I do really believe that the best option is to move this code out of the hibernate/hibernate-orm repo.  To me that could mean a separate repo altogether (infinispan/infinispan-hibernate-l2c, or sim) or into infinispan proper if Infinispan already has Hibernate dependency as Sanne mentioned somewhere. </p>
<p dir="ltr">As far as Hibernate..  master is in fact 5.2, 6.0 exists just in my fork atm - we are still discussing the exact event that should trigger moving that 6.0 branch up stream.  6.0 timeline is still basically unknown especially as far as a Final goes.  </p>
<br><div class="gmail_quote"><div dir="ltr">On Wed, May 24, 2017, 11:04 AM Galder Zamarreño &lt;<a href="mailto:galder@redhat.com">galder@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Adding Steve,<br>
<br>
Scott Marlow just reminded me that you&#39;ve advocated for Infinispan 2LC provider to be moved to Infinispan source tree [2].<br>
<br>
So, you might want to add your thoughts to this thread?<br>
<br>
Cheers,<br>
<br>
[2] <a href="http://transcripts.jboss.org/channel/irc.freenode.org/%23hibernate-dev/2015/%23hibernate-dev.2015-08-06.log.html" rel="noreferrer" target="_blank">http://transcripts.jboss.org/channel/irc.freenode.org/%23hibernate-dev/2015/%23hibernate-dev.2015-08-06.log.html</a><br>
--<br>
Galder Zamarreño<br>
Infinispan, Red Hat<br>
<br>
&gt; On 24 May 2017, at 17:56, Paul Ferraro &lt;<a href="mailto:paul.ferraro@redhat.com" target="_blank">paul.ferraro@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Option #4 would be my preference as well.  The integration into WF has<br>
&gt; become increasingly cumbersome as the pace of Infinispan releases (and<br>
&gt; associated API changes) has increased.  I would really rather avoid<br>
&gt; having to create and maintain forks of hibernate-infinispan to support<br>
&gt; the combination of Hibernate and Infinispan that don&#39;t exist in the<br>
&gt; upstream codebase.<br>
&gt;<br>
&gt; On Wed, May 24, 2017 at 11:18 AM, Sanne Grinovero &lt;<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>&gt; wrote:<br>
&gt;&gt; I would suggest option 4# : move the 2LC implementation to Infinispan.<br>
&gt;&gt;<br>
&gt;&gt; I already suggested this in the past, but to remind the main arguments I have:<br>
&gt;&gt;<br>
&gt;&gt; - neither repository is ideal, but having it here vs there is not<br>
&gt;&gt; just moving the problem as the two projects are different, have<br>
&gt;&gt; different timelines and different backwards compatibility policies.<br>
&gt;&gt;<br>
&gt;&gt; - Infinispan already depends on several Hibernate projects - even<br>
&gt;&gt; directly to Hibernate ORM itself via the JPA cachestore and indirectly<br>
&gt;&gt; via Hibernate Search and WildFly - so moving the Infinispan dependency<br>
&gt;&gt; out of the Hibernate repository helps to linearize the build for one<br>
&gt;&gt; consistent stack.<br>
&gt;&gt; For example right now WildFly master contains a combination of<br>
&gt;&gt; Hibernate ORM and Infinispan 2LC, which is not the same combination as<br>
&gt;&gt; tested by running the 2LC testsuite; this happens all the time and<br>
&gt;&gt; brings its own set of issues &amp; delays.<br>
&gt;&gt;<br>
&gt;&gt; - Infinispan changes way more often - and as Radim already suggested<br>
&gt;&gt; in his previous email - there&#39;s more benefit in having such advanced<br>
&gt;&gt; code more closely tied to Infinispan so that it can benefit from new<br>
&gt;&gt; capabilities even though these might not be ready to be blessed as<br>
&gt;&gt; long term API. The 2LC SPI in Hibernate on the other hand is stable,<br>
&gt;&gt; and has to stay stable anyway, for other reasons not least integration<br>
&gt;&gt; with other providers, so there&#39;s no symmetric benefit in having this<br>
&gt;&gt; code in Hibernate.<br>
&gt;&gt;<br>
&gt;&gt; - Infinispan releases breaking changes with a more aggressive pace.<br>
&gt;&gt; It&#39;s more useful for Infinispan 9 to be able to support older versions<br>
&gt;&gt; of Hibernate ORM, than the drawback of a new ORM release not having<br>
&gt;&gt; yet an Infinispan release compatible. This last point is the only<br>
&gt;&gt; drawback I can see, and franckly it&#39;s both a temporary situation as<br>
&gt;&gt; Infinispan can catch up quickly and a very inlikely situation as<br>
&gt;&gt; Hibernate ORM is unlikely to change these SPIs in e.g. the next major<br>
&gt;&gt; release 6.0.<br>
&gt;&gt;<br>
&gt;&gt; - Infinispan occasionally breaks expectations of the 2LC code, as<br>
&gt;&gt; Galder just had to figure out with a painful upgrade. We can all agree<br>
&gt;&gt; that these changes are necessary, but I strongly believe it&#39;s useful<br>
&gt;&gt; to *know* about such breackages ASAP from the testsuite, not half a<br>
&gt;&gt; year later when a major dependency upgrade propagates to other<br>
&gt;&gt; projects.<br>
&gt;&gt;<br>
&gt;&gt; - The Hibernate ORM would appreciate getting rid of debugging<br>
&gt;&gt; clustering and networking issues when there&#39;s the occasional failure,<br>
&gt;&gt; which are stressful as they are out of their area of expertise.<br>
&gt;&gt;<br>
&gt;&gt; I hope that makes sense?<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt; Sanne<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 24 May 2017 at 08:49, Radim Vansa &lt;<a href="mailto:rvansa@redhat.com" target="_blank">rvansa@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt; Hi Galder,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I think that (3) is simply not possible (from non-technical perspective)<br>
&gt;&gt;&gt; and I don&#39;t think we have the manpower to maintain 2 different modules<br>
&gt;&gt;&gt; (2). The current version does not seem ready (generic enough) to get<br>
&gt;&gt;&gt; into Infinispan, so either (1), or a lot of more work towards (4) (which<br>
&gt;&gt;&gt; would be my preference).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I haven&#39;t thought about all the steps for (4), but it seems that<br>
&gt;&gt;&gt; UnorderedDistributionInterceptor and LockingInterceptor should get into<br>
&gt;&gt;&gt; Infinispan as a flavour of repl/dist cache mode that applies update in<br>
&gt;&gt;&gt; parallel on all owners without any ordering; it&#39;s up to the user to<br>
&gt;&gt;&gt; guarantee that changes to an entry are commutative.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The 2LC code itself shouldn&#39;t use the<br>
&gt;&gt;&gt; TombstoneCallInterceptor/VersionedCallInterceptor now that there is the<br>
&gt;&gt;&gt; functional API, you should move the behavior to functions.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Regarding the invalidation mode, I think that a variant that would void<br>
&gt;&gt;&gt; any writes to the entry (begin/end invalidation) could be moved to<br>
&gt;&gt;&gt; Infinispan, too. I am not even sure if current invalidation in<br>
&gt;&gt;&gt; Infinispan is useful - you can&#39;t transparantly cache access to<br>
&gt;&gt;&gt; repeatable-read isolated DB (where reads block writes), but the blocking<br>
&gt;&gt;&gt; as we do in 2LC now is probably too strong if we&#39;re working with DB<br>
&gt;&gt;&gt; using just read committed as the isolation level. I was always trying to<br>
&gt;&gt;&gt; enforce linearizability, TBH I don&#39;t know how to write a test that would<br>
&gt;&gt;&gt; test a more relaxed consistency.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Btw., I&#39;ve noticed that you&#39;ve set isolation level to READ_COMMITTED in<br>
&gt;&gt;&gt; default configuration - isolation level does not apply at all to<br>
&gt;&gt;&gt; non-transactional caches, so please remove that as it would be just a noise.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Radim<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 05/23/2017 03:07 PM, Galder Zamarreño wrote:<br>
&gt;&gt;&gt;&gt; Hi all,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I&#39;ve just finished integrating Infinispan with a HB 6.x branch Steve had, all tests pass now [1].<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Yeah, we didn&#39;t commit on the final location for these changes.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; As far as I know, Hibernate master is not 6.x, but rather 5.2.x. There&#39;s no 5.2.x branch in Hibernate main repo. 6.x is just a branch that Steve has.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; These are the options availble to us:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; 1. Integrate 9.x provider as part of &#39;hibernate-infinispan&#39; in Hibernate 6.x branch.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; 2. Integrate 9.x provider as part of a second Infinispan module in Hibernate 5.x branch.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; 3. Integrate 9.x provider as part of &#39;hibernate-infinispan&#39; in Hibernate 5.x branch. This is problematic for since the provider is not backwards compatible.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; 4. Integrate 9.x provider in infinispan and deliver it as part of Infinispan rather than Hibernate.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I&#39;m not sure which one I prefer the most TBH... 1. is the ideal solution but doesn&#39;t seem there will be a Hibernate 6.x release for a while. 2./3./4. all have their downsides... :\<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Thoughts?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; [1] <a href="https://github.com/galderz/hibernate-orm/commits/t_i9x_v2" rel="noreferrer" target="_blank">https://github.com/galderz/hibernate-orm/commits/t_i9x_v2</a><br>
&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt; Galder Zamarreño<br>
&gt;&gt;&gt;&gt; Infinispan, Red Hat<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On 16 May 2017, at 17:06, Paul Ferraro &lt;<a href="mailto:paul.ferraro@redhat.com" target="_blank">paul.ferraro@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Thanks Galder.  I read through the infinispan-dev thread on the<br>
&gt;&gt;&gt;&gt;&gt; subject, but I&#39;m not sure what was concluded regarding the eventual<br>
&gt;&gt;&gt;&gt;&gt; home for this code.<br>
&gt;&gt;&gt;&gt;&gt; Once the testsuite passes, is the plan to commit to hibernate master?<br>
&gt;&gt;&gt;&gt;&gt; If so, I will likely fork                                                     these changes into a WF module (and adapt it<br>
&gt;&gt;&gt;&gt;&gt; for Hibernate 5.1.x) so that WF12 can move to JGroups4+Infinispan9<br>
&gt;&gt;&gt;&gt;&gt; until Hibernate6 is integrated.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Radim - one thing you mentioned on that infinispan-dev thread puzzled<br>
&gt;&gt;&gt;&gt;&gt; me: you said that invalidation mode offers no benefits over<br>
&gt;&gt;&gt;&gt;&gt; replication.  How is that possible?  Can you elaborate?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Paul<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On Tue, May 16, 2017 at 9:03 AM, Galder Zamarreño &lt;<a href="mailto:galder@redhat.com" target="_blank">galder@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt; I&#39;m on the move, not sure if Paul/Radim saw my replies:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; &lt;pferraro&gt; galderz, rvansa: Hey guys - is there a plan for Hibernate &amp;<br>
&gt;&gt;&gt;&gt;&gt;&gt;    ISPN 9?<br>
&gt;&gt;&gt;&gt;&gt;&gt; &lt;rvansa&gt; pferraro: Galder has been working on that<br>
&gt;&gt;&gt;&gt;&gt;&gt; &lt;rvansa&gt; pferraro: though I haven&#39;t seen any results but a list of<br>
&gt;&gt;&gt;&gt;&gt;&gt;    stuff that needs to be changed<br>
&gt;&gt;&gt;&gt;&gt;&gt; &lt;pferraro&gt; galderz: which Hibernate branch are you targeting?<br>
&gt;&gt;&gt;&gt;&gt;&gt; &lt;rvansa&gt; pferraro: 5.2, but there are minute differences between 5.x<br>
&gt;&gt;&gt;&gt;&gt;&gt;    in terms of the parts that need love to get Infinispan 9 support<br>
&gt;&gt;&gt;&gt;&gt;&gt; *** Mode change: +v vblagoje on #infinispan by ChanServ<br>
&gt;&gt;&gt;&gt;&gt;&gt;    (ChanServ@services.)<br>
&gt;&gt;&gt;&gt;&gt;&gt; &lt;pferraro&gt; rvansa: are you suggesting that 5.0 or 5.1 branches will be<br>
&gt;&gt;&gt;&gt;&gt;&gt;    adapted to additionally support infinispan 9?  how is that<br>
&gt;&gt;&gt;&gt;&gt;&gt;    possible?<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: i&#39;m working on it as we speak...<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: down to 16 failuresd<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: i started a couple of months ago, but had talks/demos to<br>
&gt;&gt;&gt;&gt;&gt;&gt;    prepare<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: i&#39;ve got back to working on it this week<br>
&gt;&gt;&gt;&gt;&gt;&gt; ...<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: rvansa<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; rvansa: minute differences my ass ;p<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: did you see my replies?<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; i got disconnected while replying...<br>
&gt;&gt;&gt;&gt;&gt;&gt; &lt;pferraro&gt; hmm - no - I didn&#39;t<br>
&gt;&gt;&gt;&gt;&gt;&gt; &lt;pferraro&gt; galderz: ^<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: so, working on the HB + I9 integration as we speak<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: i started a couple of months back but had talks/demos to<br>
&gt;&gt;&gt;&gt;&gt;&gt;    prepare and had to put that aside<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: i&#39;m down to 16 failures<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: serious refactoring required of the integration to get it<br>
&gt;&gt;&gt;&gt;&gt;&gt;    to compile and the tests to pass<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: need to switch to async interceptor stack in 2lc<br>
&gt;&gt;&gt;&gt;&gt;&gt;    integration and get all the subtle changes right<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: it&#39;s a painstaking job basically<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: i&#39;m working on<br>
&gt;&gt;&gt;&gt;&gt;&gt;    <a href="https://github.com/galderz/hibernate-orm/tree/t_i9x_v2" rel="noreferrer" target="_blank">https://github.com/galderz/hibernate-orm/tree/t_i9x_v2</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: i can&#39;t remember where i branched off, but it&#39;s a branch<br>
&gt;&gt;&gt;&gt;&gt;&gt;    that steve had since master was focused on 5.x<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: i&#39;ve no idea when/where we&#39;ll integrate this, but one<br>
&gt;&gt;&gt;&gt;&gt;&gt;    thing is for sure: it&#39;s nowhere near backwards compatible<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; actually, fixed one this morning, so down to 15 failures<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; pferraro: any suggestions/wishes?<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; is anyone out there? ;)<br>
&gt;&gt;&gt;&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt;&gt;&gt; Galder Zamarreño<br>
&gt;&gt;&gt;&gt;&gt;&gt; Infinispan, Red Hat<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Radim Vansa &lt;<a href="mailto:rvansa@redhat.com" target="_blank">rvansa@redhat.com</a>&gt;<br>
&gt;&gt;&gt; JBoss Performance Team<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
<br>
</blockquote></div>