[
https://issues.apache.org/jira/browse/SOLR-15672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17479666#comment-17479666
]
David Smiley commented on SOLR-15672:
-------------------------------------
It appears to me that the ZK /collections/colNAME/shardNAME/leader node is
redundant with the cluster state. It's referenced by
org.apache.solr.common.cloud.ZkStateReader#getShardLeadersPath called by
getLeaderProps called by
[ZkController.getLeader|https://github.com/apache/solr/blob/4029a925a68f008dadffed0eb4e6d040daffdcb0/solr/core/src/java/org/apache/solr/cloud/ZkController.java#L1333].
It's reason for existence is in a comment:
{noformat}
// rather than look in the cluster state file, we go straight to the zknodes
// here, because on cluster restart there could be stale leader info in the
// cluster state node that won't be updated for a moment
{noformat}
That seems like an optimization? Instead, in that circumstance, maybe the
state should be refreshed instead.
[~markrmiller]
> Leader Election is flawed.
> ---------------------------
>
> Key: SOLR-15672
> URL: https://issues.apache.org/jira/browse/SOLR-15672
> Project: Solr
> Issue Type: Bug
> Reporter: Mark Robert Miller
> Priority: Major
>
> Filing this not as a work item I’m assigning my to myself, but to note a open
> issue where some notes can accumulate.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]