-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Hibernate Search + Infinispan + JGroups
PostPosted: Thu Jun 19, 2014 7:30 pm 
Newbie

Joined: Thu Jun 19, 2014 7:13 pm
Posts: 2
Our application runs on Tomcat and uses Hibernate for JPA, and Hibernate Search to provide full text search. It needs to run in cluster environment therefore after ready the Hibernate Search documentation I decided to configure Infinispan as the directory provider and JGroups as a backend.

First of all it's not very clear to me whether I need two JGroups configuration - one for Infinispan and one for the backend or will it use the same?

And the problem I'm facing with:
I'm observing is that when I update an entity (that is visible on both nodes) on node1 the changes are visible on both node1 and node2, however if I create an entity on node1 the changes are visible only on node2 (the other).

I update an entity that is visible only on node2 the changes are visible only on node2, the entity remains invisible for node1

If i create an entity on node2 the changes are again visible only on node2. If I update and entity on node2 then the changes are visible on both nodes.

This sounds similar to a master/slave replication where the changes are written to the master only, but this is true only in case I create an entity (INSERT), not if I modify (UPDATE) an existing one.

Versions:
Hibernate Search 4.3.0
Infinispan 5.2.5
JGroups 3.2.7

What could be the cause of this behavior?


Top
 Profile  
 
 Post subject: Re: Hibernate Search + Infinispan + JGroups
PostPosted: Wed Jun 25, 2014 10:35 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
First of all it's not very clear to me whether I need two JGroups configuration - one for Infinispan and one for the backend or will it use the same?

That is correct, Infinispan just happens to use JGroups as well and the two configurations (and channels) are created and used independently. You might actually want to make sure the two cluster names are different so that the two cluster groups are isolated from each other.

I never heard of a problem like you describe, I suspect a configuration mistake? To clarify, you do indeed need to configure the nodes in a master/slave configuration: only one node writes to the index, and the other node needs to forward requests using the jgroups backend. The node writing should NOT use the NRT backend, since this doesn't flush all writes immediately.

Quote:
This sounds similar to a master/slave replication where the changes are written to the master only, but this is true only in case I create an entity (INSERT), not if I modify (UPDATE) an existing one.


It would be very helpful if you could share a test or demo app? In case you are interested in the tests, I'd encourage you to look into the source code to see how we write tests, it's quite simple and there are plenty of helpers to reuse.

Quote:
Hibernate Search 4.3.0
Infinispan 5.2.5
JGroups 3.2.7


These are quite old versions. Would you be able to verify that you're not hitting a solved problem by updating to our latest stable release?

Hibernate Search 4.5.1.Final
Infinispan 6.0.2.Final
JGroups 3.4.3.Final
Hibernate ORM 4.3.5.Final

Final thought:
could you also try to set
hibernate.search.​enable_dirty_check = false
if that helps, the problem is not clustering related at all.. ;-)

HTH

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Hibernate Search + Infinispan + JGroups
PostPosted: Thu Aug 14, 2014 12:39 pm 
Newbie

Joined: Thu Jun 19, 2014 7:13 pm
Posts: 2
Hi Sanne,

thanks for the response and the clarification. After I understood that I need two separate JGroups config (and configured Hibernate Search to use jgoups as backend) the setup went easily. Maybe the documentation could contain a notice about having separate JGroups config.

Thanks!
Andras


Top
 Profile  
 
 Post subject: Re: Hibernate Search + Infinispan + JGroups
PostPosted: Fri Aug 15, 2014 5:57 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi Andras, good point. I'm actually working to simplify all of the clustered setups, but if I don't finish on time for 5.0 I'll at least clarify that in the docs.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.