lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (JIRA)" <>
Subject [jira] [Commented] (SOLR-3785) Cluster-state inconsistent
Date Tue, 04 Sep 2012 13:45:07 GMT


Mark Miller commented on SOLR-3785:

Well, I added something like this last week, but I'm not sure it covers the case where there
is no other replica to take over as leader.

Last week, I noticed that when a leader goes down, no one removes the leader marker from the
cluster state. I changed it so that the next candidate leader immediately does this before
the leader election process kicks off - this lets you see the leader briefly go away until
a new leader is elected. There has to be another leader candidate to publish that change currently
though (this was an easy add, that's why I did it that way).

To get it to work where there is no new leader candidate, we have to change it so that the
overseer does this I think.

Thoughts Sami?
> Cluster-state inconsistent
> --------------------------
>                 Key: SOLR-3785
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>         Environment: Self-build Solr release built on Apache Solr revision 1355667 from
4.x branch
>            Reporter: Per Steffensen
> Information in CloudSolrServer.getZkStateReader().getCloudState() (called cloudState
below) seems to be inconsistent. 
> I have a Solr running the leader of slice "sliceName" in collection "collectionName"
- no replica to take over. I shut down this Solr, and I want to detect that there is now no
leader active. 
> I do e.g.
> {code}
> ZkNodeProps leader = cloudState.getLeader(indexName, sliceName);
> boolean notActive = (leader == null) || !leader.containsKey(ZkStateReader.STATE_PROP)
|| !leader.get(ZkStateReader.STATE_PROP).equals(ZkStateReader.ACTIVE);
> {code}
> This does not work. It seems like changing state of a shard does it not changed when
this Solr goes down.
> I do e.g.
> {code}
> ZkNodeProps leader = cloudState.getLeader(indexName, sliceName);
> boolean notActive = (leader == null) || !leader.containsKey(ZkStateReader.STATE_PROP)
|| !leader.get(ZkStateReader.STATE_PROP).equals(ZkStateReader.ACTIVE) ||
> !leader.containsKey(ZkStateReader.NODE_NAME_PROP) || !cloudState.getLiveNodes().contains(leader.get(ZkStateReader.NODE_NAME_PROP))
> {code}
> Whis works.
> It seems like live-nodes of cloudState is updated when Solr goes down, but that some
of the other info available through cloudState is not - e.g. getLeader().
> This might already have already been solved on 4.x branch in a revision later than 1355667.
Then please just tell me - thanks.
> Regards, Per Steffensen

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message