lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Change leader in SolrCloud
Date Mon, 11 Jan 2016 21:42:33 GMT
On 1/11/2016 1:23 PM, Gian Maria Ricci - aka Alkampfer wrote:
> Ok, this imply that if I have X replica of a shard, the document is indexed X+1 times?
one for each replica plus the leader shard? It seems to me a huge wasting of resources.  
> In a Master/slave scenario indexing takes places only on master node, then slave replicates
analyzed data.  

The leader *is* a replica.  So if you have a replicationFactor of three,
you have three replicas for each shard.  For each shard, one of those
replicas gets elected to be the leader.  You do not have a leader and
two replicas.

The above is perhaps extremely pedantic, but understanding how SolrCloud
works requires understanding that being temporarily assigned the leader
role does not change how the replica works, it just adds some additional
coordination responsibilities.

To answer your question, let's assume you build an index with
replicationFactor=3.  No new replicas are added, and all machines are
up.  In that situation, each document gets indexed a total of three times.

In return for this additional complexity and resource usage, you don't
have a single point of failure for indexing.  With master/slave
replication, if your master goes down for any length of time, you must
reconfigure all of your remaining Solr nodes to change the master. 
Chances are very good that you will experience downtime.


View raw message