Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6847

LeaderInitiatedRecoveryThread compares wrong replica's state with lirState

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.10.2
    • Fix Version/s: 4.10.4, 5.0, 6.0
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      LeaderInitiatedRecoveryThread looks at a random replica to figure out if it should re-publish LIR state to "down". It does however publish the LIR state for the correct replica.

      The bug has always been there. The thread used ZkStateReader.getReplicaProps method with the coreName to find the correct replica. However, the coreName parameter in getReplicaProps was un-used and I removed it in SOLR-6240 but I didn't find and fix this bug then.

      The possible side-effects of this bug would be that we may be republish LIR state multiple times and/or in rare cases, cause double 'requestrecovery' to be executed on a replica.

      1. SOLR-6847.patch
        4 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Patch with the fix. It is hard to write a test to trigger this situation because it depends on the first replica returned by getReplicaProp to be a different one so I'm going to leave it at this.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Patch with the fix. It is hard to write a test to trigger this situation because it depends on the first replica returned by getReplicaProp to be a different one so I'm going to leave it at this.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1653879 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1653879 ]

        SOLR-6847: LeaderInitiatedRecoveryThread compares wrong replica's state with lirState

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1653879 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1653879 ] SOLR-6847 : LeaderInitiatedRecoveryThread compares wrong replica's state with lirState
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1653880 from shalin@apache.org in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1653880 ]

        SOLR-6847: LeaderInitiatedRecoveryThread compares wrong replica's state with lirState

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1653880 from shalin@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1653880 ] SOLR-6847 : LeaderInitiatedRecoveryThread compares wrong replica's state with lirState
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1653881 from shalin@apache.org in branch 'dev/branches/lucene_solr_5_0'
        [ https://svn.apache.org/r1653881 ]

        SOLR-6847: LeaderInitiatedRecoveryThread compares wrong replica's state with lirState

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1653881 from shalin@apache.org in branch 'dev/branches/lucene_solr_5_0' [ https://svn.apache.org/r1653881 ] SOLR-6847 : LeaderInitiatedRecoveryThread compares wrong replica's state with lirState
        Hide
        anshumg Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        anshumg Anshum Gupta added a comment - Bulk close after 5.0 release.
        Hide
        steve_rowe Steve Rowe added a comment -

        Reopening to backport to 4.10.4

        Show
        steve_rowe Steve Rowe added a comment - Reopening to backport to 4.10.4
        Hide
        steve_rowe Steve Rowe added a comment -

        Committed to lucene_solr_4_10

        Show
        steve_rowe Steve Rowe added a comment - Committed to lucene_solr_4_10
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1662797 from Steve Rowe in branch 'dev/branches/lucene_solr_4_10'
        [ https://svn.apache.org/r1662797 ]

        SOLR-6847: LeaderInitiatedRecoveryThread compares wrong replica's state with lirState (merged branch_5x r1653880)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1662797 from Steve Rowe in branch 'dev/branches/lucene_solr_4_10' [ https://svn.apache.org/r1662797 ] SOLR-6847 : LeaderInitiatedRecoveryThread compares wrong replica's state with lirState (merged branch_5x r1653880)
        Hide
        mikemccand Michael McCandless added a comment -

        Bulk close for 4.10.4 release

        Show
        mikemccand Michael McCandless added a comment - Bulk close for 4.10.4 release

          People

          • Assignee:
            steve_rowe Steve Rowe
            Reporter:
            shalinmangar Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development