Solr
  1. Solr
  2. SOLR-6847

LeaderInitiatedRecoveryThread compares wrong replica's state with lirState

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
        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
        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
        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
        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
        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
        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
        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
        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
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

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

        Reopening to backport to 4.10.4

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

        Committed to lucene_solr_4_10

        Show
        Steve Rowe added a comment - Committed to lucene_solr_4_10
        Hide
        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
        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
        Michael McCandless added a comment -

        Bulk close for 4.10.4 release

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development