You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jonathan Rochkind <ro...@jhu.edu> on 2013/05/15 21:47:53 UTC
replication without automated polling, just manual trigger?
I want to set up Solr replication between a master and slave, where no
automatic polling every X minutes happens, instead the slave only
replicates on command. [1]
So the basic question is: What's the best way to do that? But I'll
provide what I've been doing etc., for anyone interested.
Until recently, my appliation was running on Solr 1.4. I had a setup
that was working to accomplish this in Solr 1.4, but as I work on moving
it to Solr 4.3, it's unclear to me if it can/will work the same way.
In Solr 1.4, on slave, I supplied a masterUrl, but did NOT supply any
pollInterval at all on slave. I did NOT supply an "enable"
"false" in slave, because I think that would have prevented even manual
replication.
This seemed to result in the slave never polling, although I'm not sure
if that was just an accident of Solr implementation or not. Can anyone
say if the same thing would happen in Solr 4.3? If I look at the admin
screen for my slave set up this way in Solr 4.3, it does say "polling
enabled", but I realize that doesn't neccesarily mean any polling will
take place, since I've set no pollInterval.
In Solr 1.4 under this setup, I could go to the slave's
admin/replication, and there was a "replicate now" button that I could
use for manually triggered replication. This button seems to no longer
be there in 4.3 replication admin screen, although I suppose I could
still, somewhat less conveniently, issue a
`replication?command=fetchindex` to the slave, to manually trigger a
replication?
Thanks for any advice or ideas.
[1]: Why, you ask? The master is actually my 'indexing' server. Due to
business needs, indexing only happens in bulk/mass indexing, and only
happens periodically -- sometimes nightly, sometimes less. So I index on
master, at a periodic schedule, and then when indexing is complete and
verified, tell slave to replicate. I don't want slave accidentally
replicating in the middle of the bulk indexing process either, when the
index might be in an unfinished state.
Re: replication without automated polling, just manual trigger?
Posted by Chris Hostetter <ho...@fucit.org>.
: In Solr 1.4, on slave, I supplied a masterUrl, but did NOT supply any
: pollInterval at all on slave. I did NOT supply an "enable"
: "false" in slave, because I think that would have prevented even manual
: replication.
that exact same config should still work with solr 4.3
: This seemed to result in the slave never polling, although I'm not sure if
: that was just an accident of Solr implementation or not. Can anyone say if
it's intentional.
: the same thing would happen in Solr 4.3? If I look at the admin screen for my
: slave set up this way in Solr 4.3, it does say "polling enabled", but I
: realize that doesn't neccesarily mean any polling will take place, since I've
: set no pollInterval.
correct.
: In Solr 1.4 under this setup, I could go to the slave's admin/replication, and
: there was a "replicate now" button that I could use for manually triggered
: replication. This button seems to no longer be there in 4.3 replication admin
Hmmm... there should be a giant blue "Replicate Now" button just below the
"Refresh Status" button and just above the "Disable (or Enable) Polling"
button.
But this button will only appear for collections where replication is
configured with a slave section (and has a masterUrl).
If the master is down, the button goes away (and you get an
"invalid_master" error in the UI). If it's not configured as a slave, the
button never appears, because it has no idea what host to pull from if you
clicked it.
If you aren't seeing this button on your slave, then can you please
provide...
* your slave config
* your master config
* the output of /replication?command=details from your slave
* the output of /replication?command=details from your master
* your browser details
* a screenshot of what your replication screen looks like on the slave?
...since attachments don't really work well with th mailing list, i would
suggest open a Jira and attaching these details
-Hoss
Re: replication without automated polling, just manual trigger?
Posted by Shreejay Nair <sh...@gmail.com>.
You can disable polling so that the slave never polls the Master(In Solr
4.3 you can disable it from the Admin interface). . And you can trigger a
replication using the HTTP API
http://wiki.apache.org/solr/SolrReplication#HTTP_API or again, use the
Admin interface to trigger a manual replication.
On Wed, May 15, 2013 at 12:47 PM, Jonathan Rochkind <ro...@jhu.edu>wrote:
> I want to set up Solr replication between a master and slave, where no
> automatic polling every X minutes happens, instead the slave only
> replicates on command. [1]
>
> So the basic question is: What's the best way to do that? But I'll provide
> what I've been doing etc., for anyone interested.
>
> Until recently, my appliation was running on Solr 1.4. I had a setup that
> was working to accomplish this in Solr 1.4, but as I work on moving it to
> Solr 4.3, it's unclear to me if it can/will work the same way.
>
> In Solr 1.4, on slave, I supplied a masterUrl, but did NOT supply any
> pollInterval at all on slave. I did NOT supply an "enable"
> "false" in slave, because I think that would have prevented even manual
> replication.
>
> This seemed to result in the slave never polling, although I'm not sure if
> that was just an accident of Solr implementation or not. Can anyone say if
> the same thing would happen in Solr 4.3? If I look at the admin screen for
> my slave set up this way in Solr 4.3, it does say "polling enabled", but I
> realize that doesn't neccesarily mean any polling will take place, since
> I've set no pollInterval.
>
> In Solr 1.4 under this setup, I could go to the slave's admin/replication,
> and there was a "replicate now" button that I could use for manually
> triggered replication. This button seems to no longer be there in 4.3
> replication admin screen, although I suppose I could still, somewhat less
> conveniently, issue a `replication?command=**fetchindex` to the slave, to
> manually trigger a replication?
>
>
>
> Thanks for any advice or ideas.
>
>
>
> [1]: Why, you ask? The master is actually my 'indexing' server. Due to
> business needs, indexing only happens in bulk/mass indexing, and only
> happens periodically -- sometimes nightly, sometimes less. So I index on
> master, at a periodic schedule, and then when indexing is complete and
> verified, tell slave to replicate. I don't want slave accidentally
> replicating in the middle of the bulk indexing process either, when the
> index might be in an unfinished state.
>