Re: Block until replication finishes

2014-04-01 Thread Mikhail Khludnev
On Tue, Apr 1, 2014 at 5:02 PM, Fermin Silva wrote: > Sorry but I have no clue about how to contribute with code. Will check that > but if someone can point me to the right direction it would be nice. > You are welcome http://wiki.apache.org/solr/HowToContribute Btw, cool finding re wait param!

Re: Block until replication finishes

2014-04-01 Thread Fermin Silva
When trying to add the fix to the trunk version, I found that this was already implemented. There is a parameter '*wait*' that does exactly that. if (solrParams.getBool(WAIT, false)) { puller.join(); } So the only possible way to do this in SOLR 3.x is to create a plugin with a new replic

Re: Block until replication finishes

2014-04-01 Thread Fermin Silva
The ReplicationHandler class is not the most exemplar code to be looking at. I found however the line that could be changed: new Thread() { @Override public void run() { doFetch(paramsCopy); } }.start(); rsp.add(STATUS, OK_STATUS); It should be really simpl

Re: Block until replication finishes

2014-03-29 Thread Mikhail Khludnev
Hello, We did this for our fork, if you are not happy with "RESTful polling", or think that the synchronous replication handler might be useful, please raise a jira. 27.03.2014 17:35 пользователь "Fermin Silva" написал: > Hi, > > we are moving to native replication with SOLR 3.5.1. > Because we

Re: Block until replication finishes

2014-03-28 Thread Fermin Silva
Hi, that's what I'm trying. I'm however really cautious when it comes to a while (somethingIsTrue) { doSomething; sleep; } Is that safe? What if the slave hungs up, the network is slow/fails, etc? Thanks On Thu, Mar 27, 2014 at 1:40 PM, Chris W wrote: > Hi > > You can use the "details"

Re: Block until replication finishes

2014-03-28 Thread Chris W
You can use a timeout? In our system we do that same but with a timeout of around 30 minutes for any replication to slave completes. So far any replication > 30 minutes (even for cores as big as 10G) indicated a problem with a core or network on our side On Fri, Mar 28, 2014 at 6:43 AM, Fermin

Re: Block until replication finishes

2014-03-27 Thread Chris W
Hi You can use the "details" command to check the status of replication. http://localhost:8983/solr/core_name/replication?command=details The command returns an xml output and look out for the "isReplicating" field in the output. Keep running the command in a loop until the flag becomes false. T

Block until replication finishes

2014-03-27 Thread Fermin Silva
Hi, we are moving to native replication with SOLR 3.5.1. Because we want to control the replication from another program (a cron job), we decided to curl the slave to issue a fetchIndex command. The problem we have is that the curl returns immediately, while the replication still goes in the back