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 Chuong Thao <ct...@redhat.com> on 2018/08/01 16:05:55 UTC

Master recovery in ReplicationHandler

Hi everyone,

I am looking to deploy Solr 7.3 in containers with replication handler. Is there a way to recover the docs on master from the slave if the master is suddenly killed?
Charles T
Sent from Mailspring (https://link.getmailspring.com/link/1533139162.local-0bbc9928-2402-v1.3.0-fd741eb7@getmailspring.com/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3Jn), the best free email app for work

Re: Master recovery in ReplicationHandler

Posted by Chuong Thao <ct...@redhat.com>.
Hi Shawn, thank you for replying I'm following this https://lucene.apache.org/solr/guide/7_3/making-and-restoring-backups.html#backup-restore-storage-repositories (https://link.getmailspring.com/link/1533322369.local-73f54f42-640a-v1.3.0-fd741eb7@getmailspring.com/0?redirect=https%3A%2F%2Flucene.apache.org%2Fsolr%2Fguide%2F7_3%2Fmaking-and-restoring-backups.html%23backup-restore-storage-repositories&recipient=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3Jn). I am planning to keep 5 copies in a local directory, how do I specify that directory in, perhaps, SolrConfig.xml?

Charles
On Aug 2 2018, at 1:56 pm, Shawn Heisey <ap...@elyograg.org> wrote:
>
> On 8/1/2018 10:05 AM, Chuong Thao wrote:
> > I am looking to deploy Solr 7.3 in containers with replication handler. Is there a way to recover the docs on master from the slave if the master is suddenly killed?
>
>
> Replication in a master-slave setup only goes from master to slave. It
> cannot go from slave to master.
>
> "Recovery" is a SolrCloud concept. SolrCloud does use the replication
> handler to accomplish recovery, but in a SolrCloud setup, the
> replication handler has no explicit configuration. When a recovery is
> required, SolrCloud configures the replication handler on the fly and
> initiates a one-time replication. Historically, SolrCloud did not use
> the replication handler for normal index synchronization. In 7.x
> versions, new replica types exist that DO use the replication handler
> ... but it's configured on the fly in the same way that index recovery is.
>
> To do what you want to do, I see two options:
> 1) Copy index directories from the slave to the master before you start
> the master.
> 2) Reconfigure your systems so that the slave becomes the master and the
> master becomes a slave, then restart the processes.
>
> Either way, it's a manual process. This is not likely to change. If
> you want to have more automation, switch to SolrCloud. Because
> SolrCloud sets up a true cluster, there are no masters and no slaves. I
> would recommend SolrCloud for most new installations, especially one
> where servers might be added or removed frequently.
>
> Thanks,
> Shawn
>


Re: Master recovery in ReplicationHandler

Posted by Shawn Heisey <ap...@elyograg.org>.
On 8/1/2018 10:05 AM, Chuong Thao wrote:
> I am looking to deploy Solr 7.3 in containers with replication handler. Is there a way to recover the docs on master from the slave if the master is suddenly killed?

Replication in a master-slave setup only goes from master to slave.  It
cannot go from slave to master.

"Recovery" is a SolrCloud concept.  SolrCloud does use the replication
handler to accomplish recovery, but in a SolrCloud setup, the
replication handler has no explicit configuration.  When a recovery is
required, SolrCloud configures the replication handler on the fly and
initiates a one-time replication.  Historically, SolrCloud did not use
the replication handler for normal index synchronization.  In 7.x
versions, new replica types exist that DO use the replication handler
... but it's configured on the fly in the same way that index recovery is.

To do what you want to do, I see two options:

1) Copy index directories from the slave to the master before you start
the master.
2) Reconfigure your systems so that the slave becomes the master and the
master becomes a slave, then restart the processes.

Either way, it's a manual process.  This is not likely to change.  If
you want to have more automation, switch to SolrCloud.  Because
SolrCloud sets up a true cluster, there are no masters and no slaves.  I
would recommend SolrCloud for most new installations, especially one
where servers might be added or removed frequently.

Thanks,
Shawn