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 Vishal Vaibhav <de...@gmail.com> on 2020/07/15 05:43:00 UTC

Question regarding replica leader

Hi Solr folks,

I am using solr cloud 8.4.1 . I am using*
`/solr/admin/collections?action=CLUSTERSTATUS`*. Hitting this endpoint I
get a list of replicas in which one is active but neither of them is
leader. Something like this

"core_node72": {"core": "rules_shard1_replica_n71","base_url": "node3,"
node_name": "node3 base url","state": "active","type": "NRT","
force_set_state": "false"},"core_node74": {"core":
"rules_shard1_replica_n73","base_url": "node1","node_name": "node1_base_url"
,"state": "down","type": "NRT","force_set_state": "false"}}}},"router": {"
name": "compositeId"},"maxShardsPerNode": "1","autoAddReplicas": "false","
nrtReplicas": "1","tlogReplicas": "0","znodeVersion": 276,"configName":
"rules"}},"live_nodes": ["node1","node2","node3","node4"] And when i see
overseer status solr/admin/collections?action=OVERSEERSTATUS I get response
like this which shows node 3 as leaderresponseHeader": {"status": 0,"QTime
": 66},"leader": "node 3","overseer_queue_size": 0,"overseer_work_queue_size
": 0,"overseer_collection_queue_size": 2,"overseer_operations": [
"addreplica",

Does it mean the cluster is having a leader node but there is no leader
replica as of now? And why the leader election is not happening?

Re: Question regarding replica leader

Posted by Vishal Vaibhav <de...@gmail.com>.
So how do we recover from such state ?  When I am trying addreplica , it
returns me 503. Also my node has multiple replicas out of them most are
dead. How do we make get rid of those dead replicas via script. ?is that a
possibility?

On Mon, 20 Jul 2020 at 11:00 AM, Radu Gheorghe <ra...@sematext.com>
wrote:

> Hi Vishal,
>
> I think that’s true, yes. The cluster has a leader (overseer), but this
> particular shard doesn’t seem to have a leader (yet). Logs should give you
> some pointers about why this happens (it may be, for example, that each
> replica is waiting for the other to become a leader, because each missed
> some updates).
>
> Best regards,
> Radu
> --
> Sematext Cloud - Full Stack Observability - https://sematext.com
> Solr and Elasticsearch Consulting, Training and Production Support
>
> > On 20 Jul 2020, at 04:17, Vishal Vaibhav <de...@gmail.com> wrote:
> >
> > Hi any pointers on this ?
> >
> > On Wed, 15 Jul 2020 at 11:13 AM, Vishal Vaibhav <de...@gmail.com>
> wrote:
> >
> >> Hi Solr folks,
> >>
> >> I am using solr cloud 8.4.1 . I am using*
> >> `/solr/admin/collections?action=CLUSTERSTATUS`*. Hitting this endpoint I
> >> get a list of replicas in which one is active but neither of them is
> >> leader. Something like this
> >>
> >> "core_node72": {"core": "rules_shard1_replica_n71","base_url": "node3,"
> >> node_name": "node3 base url","state": "active","type": "NRT","
> >> force_set_state": "false"},"core_node74": {"core":
> >> "rules_shard1_replica_n73","base_url": "node1","node_name":
> >> "node1_base_url","state": "down","type": "NRT","force_set_state":
> "false"}
> >> }}},"router": {"name": "compositeId"},"maxShardsPerNode": "1","
> >> autoAddReplicas": "false","nrtReplicas": "1","tlogReplicas": "0","
> >> znodeVersion": 276,"configName": "rules"}},"live_nodes":
> ["node1","node2",
> >> "node3","node4"] And when i see overseer status
> >> solr/admin/collections?action=OVERSEERSTATUS I get response like this
> which
> >> shows node 3 as leaderresponseHeader": {"status": 0,"QTime": 66},"leader
> >> ": "node 3","overseer_queue_size": 0,"overseer_work_queue_size": 0,"
> >> overseer_collection_queue_size": 2,"overseer_operations": ["addreplica",
> >>
> >> Does it mean the cluster is having a leader node but there is no leader
> >> replica as of now? And why the leader election is not happening?
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
>
>

Re: Question regarding replica leader

Posted by Radu Gheorghe <ra...@sematext.com>.
Hi Vishal,

I think that’s true, yes. The cluster has a leader (overseer), but this particular shard doesn’t seem to have a leader (yet). Logs should give you some pointers about why this happens (it may be, for example, that each replica is waiting for the other to become a leader, because each missed some updates).

Best regards,
Radu
--
Sematext Cloud - Full Stack Observability - https://sematext.com
Solr and Elasticsearch Consulting, Training and Production Support

> On 20 Jul 2020, at 04:17, Vishal Vaibhav <de...@gmail.com> wrote:
> 
> Hi any pointers on this ?
> 
> On Wed, 15 Jul 2020 at 11:13 AM, Vishal Vaibhav <de...@gmail.com> wrote:
> 
>> Hi Solr folks,
>> 
>> I am using solr cloud 8.4.1 . I am using*
>> `/solr/admin/collections?action=CLUSTERSTATUS`*. Hitting this endpoint I
>> get a list of replicas in which one is active but neither of them is
>> leader. Something like this
>> 
>> "core_node72": {"core": "rules_shard1_replica_n71","base_url": "node3,"
>> node_name": "node3 base url","state": "active","type": "NRT","
>> force_set_state": "false"},"core_node74": {"core":
>> "rules_shard1_replica_n73","base_url": "node1","node_name":
>> "node1_base_url","state": "down","type": "NRT","force_set_state": "false"}
>> }}},"router": {"name": "compositeId"},"maxShardsPerNode": "1","
>> autoAddReplicas": "false","nrtReplicas": "1","tlogReplicas": "0","
>> znodeVersion": 276,"configName": "rules"}},"live_nodes": ["node1","node2",
>> "node3","node4"] And when i see overseer status
>> solr/admin/collections?action=OVERSEERSTATUS I get response like this which
>> shows node 3 as leaderresponseHeader": {"status": 0,"QTime": 66},"leader
>> ": "node 3","overseer_queue_size": 0,"overseer_work_queue_size": 0,"
>> overseer_collection_queue_size": 2,"overseer_operations": ["addreplica",
>> 
>> Does it mean the cluster is having a leader node but there is no leader
>> replica as of now? And why the leader election is not happening?
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 


Re: Question regarding replica leader

Posted by Vishal Vaibhav <de...@gmail.com>.
Hi any pointers on this ?

On Wed, 15 Jul 2020 at 11:13 AM, Vishal Vaibhav <de...@gmail.com> wrote:

> Hi Solr folks,
>
> I am using solr cloud 8.4.1 . I am using*
> `/solr/admin/collections?action=CLUSTERSTATUS`*. Hitting this endpoint I
> get a list of replicas in which one is active but neither of them is
> leader. Something like this
>
> "core_node72": {"core": "rules_shard1_replica_n71","base_url": "node3,"
> node_name": "node3 base url","state": "active","type": "NRT","
> force_set_state": "false"},"core_node74": {"core":
> "rules_shard1_replica_n73","base_url": "node1","node_name":
> "node1_base_url","state": "down","type": "NRT","force_set_state": "false"}
> }}},"router": {"name": "compositeId"},"maxShardsPerNode": "1","
> autoAddReplicas": "false","nrtReplicas": "1","tlogReplicas": "0","
> znodeVersion": 276,"configName": "rules"}},"live_nodes": ["node1","node2",
> "node3","node4"] And when i see overseer status
> solr/admin/collections?action=OVERSEERSTATUS I get response like this which
> shows node 3 as leaderresponseHeader": {"status": 0,"QTime": 66},"leader
> ": "node 3","overseer_queue_size": 0,"overseer_work_queue_size": 0,"
> overseer_collection_queue_size": 2,"overseer_operations": ["addreplica",
>
> Does it mean the cluster is having a leader node but there is no leader
> replica as of now? And why the leader election is not happening?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>