Houston Putman created SOLR-17557:
-------------------------------------

             Summary: PeerSync should only be called when the ZkShardTerm is 
not the highest
                 Key: SOLR-17557
                 URL: https://issues.apache.org/jira/browse/SOLR-17557
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
          Components: SolrCloud
            Reporter: Houston Putman


Currently when a leader is elected for a shard, PeerSync is called after 
election to make sure that the new leader is not missing documents that other 
replicas have.

With the "new" LeaderInitiatedRecovery (LIR) implementation based on 
ZkShardTerms, we now have a much better idea as to which replicas have all the 
documents that the old leader had. So if the newly elected leader has the 
highest ZkShardTerm (i.e. it was already in sync with the old leader before the 
leader election), then we shouldn't need to run PeerSync.

For the break-glass scenario where the newly elected leader does *not* have the 
highest ZkShardTerm, then we will probably still want to run PeerSync, just to 
be safe, as there will probably be data loss and we want to minimize how much 
data that is.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to