-->
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.  [ 3 posts ] 
Author Message
 Post subject: integrating mass-indexing with master instance
PostPosted: Tue Oct 05, 2010 9:34 pm 
Beginner
Beginner

Joined: Thu Nov 20, 2003 10:16 pm
Posts: 28
Location: Los Angeles, CA
So I finally go the master-slave setup working over JMS/ActiveMQ. Now my question is this. What are the recommended ways of integrating mass-indexing with the master instance? Ideally, what I'd like to have is a task that fires off on some schedule that will perform the mass-index operation on the entire database. This would happen concurrently with the search listener receiving and processing index-update requests from slaves.

Assuming I set the exclusive-lock flag off, does anyone foresee any issues? Has anyone done something similar? My main concern is what would happen if the master attempts to process a slave request while the mass-indexer is running.

On a side-note, the mass-index step seems to experience deadlocks fairly frequently. I don't know if this is an issue with the c3p0 connection pool I'm using or something inherent in the indexing code itself. Anyone else have issues with this?

Thanks,

Michael


Top
 Profile  
 
 Post subject: Re: integrating mass-indexing with master instance
PostPosted: Wed Oct 06, 2010 6:25 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi Michael,
Quote:
Assuming I set the exclusive-lock flag off, does anyone foresee any issues? Has anyone done something similar? My main concern is what would happen if the master attempts to process a slave request while the mass-indexer is running.

You should run the massindexer on the master only, not on the slaves.
In any case the Massindexer was not meant to be used on a "live system", as the index is emptied at start and so clients might search on an empty index: the replacement with the new index is currently not atomical; you should use it for maintenance purposes.
Generally Hibernate Search should be able to keep the database and index always in sync, so this shouldn't be needed.. why are you needing to start it periodically?

Quote:
On a side-note, the mass-index step seems to experience deadlocks fairly frequently. I don't know if this is an issue with the c3p0 connection pool I'm using

you might deadlock if the connection pool is not big enough, as in some stages it might need more than N connections in parallel to continue; make sure to monitor your pool and either reduce the
number of thread, or enlarge the allowed maximum size of the pool.

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


Top
 Profile  
 
 Post subject: Re: integrating mass-indexing with master instance
PostPosted: Wed Oct 06, 2010 1:42 pm 
Beginner
Beginner

Joined: Thu Nov 20, 2003 10:16 pm
Posts: 28
Location: Los Angeles, CA
Hi Sanne,

Yes, I am talking about running this on the master instance, on a periodic basis and concurrently with index updates the master may be processing from slaves. The database on which my Lucene indices depend is being refreshed by an external process once every hour, so I need a way to periodically sweep through all the data and update the entire index.

As far as the connection pool deadlocking, how can I know the peak number of connections the indexer may invoke so as to configure the pool appropriately?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.