Find the discussion titled "Indexing off the production servers" just a week
ago in this same forum, there is a significant discussion of this feature
that you will probably want to review.


-----Original Message-----
From: Lan [mailto:dung....@gmail.com] 
Sent: Friday, May 10, 2013 3:42 AM
To: solr-user@lucene.apache.org
Subject: Is the CoreAdmin RENAME method atomic?

We need to implement a locking mechanism for a full-reindexing SOLR server
pool. We could use a database, Zookeeper as our locking mechanism but thats
a lot of work. Could solr do it?

I noticed the core admin RENAME function
(http://wiki.apache.org/solr/CoreAdmin#RENAME) Is this an synchronous atomic
operation?

What I'm thinking is we create a solr core named 'lock' and any process that
wants to obtain a solr server from the pool tries to rename the 'lock' core
to say 'lock.someuniqueid'. If it fails, then it tries another server in the
pools or waits a bit. If it succeeds, it reindexes it's data and then
renames 'lock.someuniqueid' back to 'lock' to return the server back to the
pool.









--
View this message in context:
http://lucene.472066.n3.nabble.com/Is-the-CoreAdmin-RENAME-method-atomic-tp4
061944.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to