You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Timothy Potter (JIRA)" <ji...@apache.org> on 2014/09/12 20:51:34 UTC

[jira] [Updated] (SOLR-6511) Fencepost error in LeaderInitiatedRecoveryThread

     [ https://issues.apache.org/jira/browse/SOLR-6511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Potter updated SOLR-6511:
---------------------------------
    Attachment: SOLR-6511.patch

Here's a patch to address this problem, specifically it does:

1) tries the recovery command at least once (Alan's fix)

2) doesn't put a replica into LIR if the node is not currently the leader anymore (added safeguard) ... the LIR thread also checks to make sure it is still running in the leader before continuing to nag the replica

> Fencepost error in LeaderInitiatedRecoveryThread
> ------------------------------------------------
>
>                 Key: SOLR-6511
>                 URL: https://issues.apache.org/jira/browse/SOLR-6511
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Alan Woodward
>            Assignee: Timothy Potter
>         Attachments: SOLR-6511.patch
>
>
> At line 106:
> {code}
>     while (continueTrying && ++tries < maxTries) {
> {code}
> should be
> {code}
>     while (continueTrying && ++tries <= maxTries) {
> {code}
> This is only a problem when called from DistributedUpdateProcessor, as it can have maxTries set to 1, which means the loop is never actually run.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org