-->
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.  [ 5 posts ] 
Author Message
 Post subject: Master Slave strange behaviour
PostPosted: Fri Oct 16, 2009 3:43 am 
Pro
Pro

Joined: Wed Oct 03, 2007 2:31 pm
Posts: 205
Hi

It seems as though with the master slave config I have the slave updates the master index rather than the other way round. I have configured the slave session factory to be:

Code:
<prop key="hibernate.search.default.indexBase">/mnt/localhost/SearchDocuments/slave/index</prop>
<prop key="hibernate.search.default.directory_provider">org.hibernate.search.store.FSSlaveDirectoryProvider</prop>
<prop key="hibernate.search.analyzer">org.apache.lucene.analysis.standard.StandardAnalyzer</prop>
<prop key="hibernate.search.worker.backend">jms</prop>
<prop key="hibernate.search.worker.jms.connection_factory">env/connectionfactory</prop>
<prop key="hibernate.search.worker.jms.queue">jms/queue</prop>
<prop key="hibernate.search.default.sourceBase">/mnt/localhost/SearchDocuments/master/index</prop>
<prop key="hibernate.search.default.refresh">300</prop>



and the master session factory to be:

Code:
<prop key="hibernate.search.default.indexBase">/mnt/localhost/SearchDocuments/slave/index</prop>
<prop key="hibernate.search.default.directory_provider">org.hibernate.search.store.FSMasterDirectoryProvider</prop>
<prop key="hibernate.search.analyzer">org.apache.lucene.analysis.standard.StandardAnalyzer</prop>
<prop key="hibernate.search.default.sourceBase">/mnt/localhost/SearchDocuments/master/index</prop>
<prop key="hibernate.search.default.refresh">300</prop>


Am I doing something wrong?


Top
 Profile  
 
 Post subject: Re: Master Slave strange behaviour
PostPosted: Sun Oct 18, 2009 11:00 am 
Pro
Pro

Joined: Wed Oct 03, 2007 2:31 pm
Posts: 205
Hi

Has anyone else experienced this problem? I am toying with the idea of using FSDirectoryProvider as I am experiencing problems with master slave configuration. I was wondering what the normal configuration is currently in production for people using HIbernsate Search.


Cheers
Amin


Top
 Profile  
 
 Post subject: Re: Master Slave strange behaviour
PostPosted: Sun Oct 18, 2009 5:38 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
The master uses his own indexBase to apply all changes as soon as he gets them;
then it periodically copies from indexBase.indexName to sourceBase.source .. so it looks like your master configuration has defined them the other-way-around.

If this doesn't solve the problem please enable logging for org.hibernate.search.store.FSSlaveDirectoryProvider, org.hibernate.search.store.FSMasterDirectoryProvider, org.hibernate.search.store.DirectoryProviderHelper (or just all org.hibernate.search.store) and let's see what you get there.
The code is open source, so it should be easy to find out what's wrong ;-)

Personally, I also get confused often by the "source" term in the names: remember it's "source" to the slave. Please suggest or provide a patch for documentation if you can find a better way to express this.

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


Top
 Profile  
 
 Post subject: Re: Master Slave strange behaviour
PostPosted: Sun Oct 18, 2009 9:32 pm 
Pro
Pro

Joined: Wed Oct 03, 2007 2:31 pm
Posts: 205
Hi

Thanks for your reply. So am I right in thinking that the slave node source dir and base index dir should be a shared mounted drive? So that the master can see and copy changes to the slave nodes. The master base index dir doesn't need to on a mounted drive? So effectively I need 3 dirs. One for master index, one for master base dir and one for slave dir?

I'm wondering if should just stick to FSDirectoryProvider and see if this is ok and load test.


Sorry if the above does not make sense (up at 1:30am). Essentially what I am asking is:

1) In the slave configuration the indexBase (different from master indexBase) and source base should be a mounted shared dir?
2) In the master configuration the indexBase does not need to be shared? If this is the case how does the master know where to upload the source changes to the slaves?

Thanks


Top
 Profile  
 
 Post subject: Re: Master Slave strange behaviour
PostPosted: Thu Oct 22, 2009 2:48 am 
Pro
Pro

Joined: Wed Oct 03, 2007 2:31 pm
Posts: 205
I've actually worked out what my problem was...the Hibernate Search in Action book clarified alot about master slave configuration.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.