[ 
https://issues.apache.org/jira/browse/SOLR-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14205055#comment-14205055
 ] 

Shalin Shekhar Mangar commented on SOLR-6721:
---------------------------------------------

bq. My concern with this approach is that you can have literally 100's of 
failures going on at once and if you wait to add to the map until the write to 
ZK succeeds, it seems like there can be many attempted writes to ZK until the 
first one returns.

That's not true because we synchronize on the map before writing to ZK and/or 
adding the replica url to the map. So all threads will wait for the lock to be 
available and then see that the map already has the replicaUrl and return.

> ZkController.ensureReplicaInLeaderInitiatedRecovery puts replica in local map 
> before writing to ZK
> --------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-6721
>                 URL: https://issues.apache.org/jira/browse/SOLR-6721
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.10.2
>            Reporter: Shalin Shekhar Mangar
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 5.0, Trunk
>
>         Attachments: SOLR-6721.patch
>
>
> ZkController.ensureReplicaInLeaderInitiatedRecovery puts replica information 
> in the local "replicasInLeaderInitiatedRecovery" map before writing to ZK. If 
> there is an exception writing to ZK then the replica is still in the local 
> map preventing future indexing failures from setting the replica in "down" 
> state.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to