Leader election will result from nodes coming up and going down as well as changes in network connectivity and even simply responsiveness between the nodes. A "quorum" is always needed.

There may be other reasons as well that I don't know about.

The point was simply that it is not a "leader" vs. "replica" issue - all of the nodes are replicas and one replica just "happens" to be be playing the role of leader at a given moment.

-- Jack Krupansky

-----Original Message----- From: Furkan KAMACI
Sent: Monday, April 22, 2013 9:41 AM
To: solr-user@lucene.apache.org
Subject: Re: SolrCloud Leaders

Hi Jack;

You said: "An hour from now some other replica may be the leader"

What is the criteria to change a leader of a shard?

2013/4/15 Jack Krupansky <j...@basetechnology.com>

All nodes are replicas in SolrCloud since there are no masters. It's a
fully distributed model. A leader is also a replica. A leader is simply a
replica which was elected to be a leader, for now. An hour from now some
other replica may be the leader.

It is indeed misleading and inaccurate to suggest that "leader" and
"replicas" are disjoint.

Once again, I think you are confusing SolrCloud with the older Solr
master/slave/replication.

Every node in SolrCloud can do indexing. That's the same as saying that
every replica in SolrCloud can do indexing.

Although we do need to be clear that a given replica will only index
documents for the shard(s) to which it belongs.


-- Jack Krupansky

-----Original Message----- From: Furkan KAMACI
Sent: Monday, April 15, 2013 9:38 AM
To: solr-user@lucene.apache.org
Subject: Re: SolrCloud Leaders

Here writes something:

https://support.lucidworks.com/entries/22180608-Solr-HA-DR-overview-3-x-and-4-0-SolrCloud-and

says:

Both leaders and replicas index items and perform searches.

How replicas index items?


2013/4/15 Furkan KAMACI <furkankam...@gmail.com>

 Does leaders may response search requests (I mean do they store indexes)
at when I run SolrCloud at first and after a time later?


2013/4/15 Jack Krupansky <j...@basetechnology.com>

When the cluster is fully operational, yes. But if part of the cluster is
down or split and unable to communicate, or leader election is in
progress,
the actual count of leaders will not be indicative of the number of
shards.

Leaders and shards are apples and oranges. If you take down a cluster, by
definition it would have no leaders (because leaders are running code),
but
shards are the files in the index on disk that continue to exist even if
the code is not running. So, in the extreme, the number of leaders can be
zero while the number of shards is non-zero on disk.

-- Jack Krupansky

-----Original Message----- From: Furkan KAMACI
Sent: Monday, April 15, 2013 8:21 AM
To: solr-user@lucene.apache.org
Subject: SolrCloud Leaders


Does number of leaders at a SolrCloud is equal to number of shards?






Reply via email to