Let's back up a moment and ask why you are doing this from scripts, because this feels like an XY problem, see: http://people.apache.org/~hossman/#xyproblem <http://people.apache.org/~hossman/#xyproblem> What are you trying to accomplish by swapping cores on the master and slave?
Solr 1.4 has configuration-based replication, are you using 1.4? This version of Solr automatically, upon replication, switches to the updated index. You can trigger a replication either by configuring the polling interval on the slave or by sending the proper HTTP request to the slave. See: http://wiki.apache.org/solr/SolrReplication#HTTP_API So, it seems like taking charge of swapping cores may be more work than you really need to do. Of course, if you're on a different version of Solr, this is irrelevant. Best Erick On Thu, Jan 27, 2011 at 8:38 AM, Shanmugavel SRD <srdshanmuga...@gmail.com>wrote: > > Markus, > The problem here is if I call the below two URLs immediately after > replication then I am getting both the index versions as same. In my python > script I have added code to swap the online core on master with offline > core > on master and online core on slave with offline core on slave, if both the > versions are same. After calling swap, I am getting error in slave's log > like below. > So I am confused why this is happening. Can you please help me on this? > > > http://master_host:port/solr/replication?command=indexversion > > http://slave_host:port/solr/replication?command=details > > > 2011-01-27 07:45:26,713 WARN [org.apache.solr.handler.SnapPuller] > (Thread-59) No content recieved for file: {size=154098810, name=_e3.cfx, > lastmodified=1296132092000} > 2011-01-27 07:45:27,396 ERROR [org.apache.solr.handler.ReplicationHandler] > (Thread-59) SnapPull failed > > org.apache.solr.common.SolrException: Unable to download _e3.cfx > completely. Downloaded 0!=154098810 > at > > org.apache.solr.handler.SnapPuller$FileFetcher.cleanup(SnapPuller.java:1026) > at > > org.apache.solr.handler.SnapPuller$FileFetcher.fetchFile(SnapPuller.java:906) > at > org.apache.solr.handler.SnapPuller.downloadIndexFiles(SnapPuller.java:541) > at > org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:294) > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/How-to-find-Master-Slave-are-in-sync-tp2287014p2362679.html > Sent from the Solr - User mailing list archive at Nabble.com. >