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

Duplicate leader elector node detection is broken

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 5.5.1, 6.0, 6.1, master (7.0)
    • Component/s: None
    • Labels:
      None

      Description

      LeaderElector.checkIfIAmLeader checks to see if it has duplicate registrations in under its election node, but it does this by prefix checking, which means that if core_node1 registers itself after core_node11, it will think it's a duplicate, and delete the core_node11 node.

      This is causing regular failures in UnloadDistributedZkTest.

      1. SOLR-8837.patch
        0.7 kB
        Scott Blum

        Issue Links

          Activity

          Hide
          romseygeek Alan Woodward added a comment -

          We can fix this by fixing the duplicate-detection logic, but I'm not sure we shouldn't just remove this entirely. I guess it could prevent an election delay in the case that a session gets interrupted and the ephemeral nodes from the previous session hang around up to the session timeout, but it seems just as likely to cause problems to me.

          Show
          romseygeek Alan Woodward added a comment - We can fix this by fixing the duplicate-detection logic, but I'm not sure we shouldn't just remove this entirely. I guess it could prevent an election delay in the case that a session gets interrupted and the ephemeral nodes from the previous session hang around up to the session timeout, but it seems just as likely to cause problems to me.
          Hide
          dragonsinth Scott Blum added a comment -

          Seems like a pretty simple fix for the exact case you mentioned. But you're right about this being a weird edge case; I definitely don't fully understand why it's there.

          Show
          dragonsinth Scott Blum added a comment - Seems like a pretty simple fix for the exact case you mentioned. But you're right about this being a weird edge case; I definitely don't fully understand why it's there.
          Hide
          romseygeek Alan Woodward added a comment -

          Thanks Scott, I'll commit this fix. Looks like the bug crept in with SOLR-8697, so it hasn't actually been released.

          Show
          romseygeek Alan Woodward added a comment - Thanks Scott, I'll commit this fix. Looks like the bug crept in with SOLR-8697 , so it hasn't actually been released.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 04bd5860710ca5ab309d2e8b2e8fb36d3bf962bc in lucene-solr's branch refs/heads/master from Alan Woodward
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=04bd586 ]

          SOLR-8837: Fix duplicate election node detection

          Show
          jira-bot ASF subversion and git services added a comment - Commit 04bd5860710ca5ab309d2e8b2e8fb36d3bf962bc in lucene-solr's branch refs/heads/master from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=04bd586 ] SOLR-8837 : Fix duplicate election node detection
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 451ff488afc4707cb8555c5629bcf0c9ebef210f in lucene-solr's branch refs/heads/branch_6x from Alan Woodward
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=451ff48 ]

          SOLR-8837: Fix duplicate election node detection

          Show
          jira-bot ASF subversion and git services added a comment - Commit 451ff488afc4707cb8555c5629bcf0c9ebef210f in lucene-solr's branch refs/heads/branch_6x from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=451ff48 ] SOLR-8837 : Fix duplicate election node detection
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 9a4c1dd15c80ec3265b8be5dc716672ec9a9973d in lucene-solr's branch refs/heads/branch_6_0 from Alan Woodward
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=9a4c1dd ]

          SOLR-8837: Fix duplicate election node detection

          Show
          jira-bot ASF subversion and git services added a comment - Commit 9a4c1dd15c80ec3265b8be5dc716672ec9a9973d in lucene-solr's branch refs/heads/branch_6_0 from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=9a4c1dd ] SOLR-8837 : Fix duplicate election node detection
          Hide
          anshumg Anshum Gupta added a comment -

          Reopening to back port for 5.5.1

          Show
          anshumg Anshum Gupta added a comment - Reopening to back port for 5.5.1
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 0b7b28a04157f4a74020ea79a29ad74c280f137f in lucene-solr's branch refs/heads/branch_5x from Alan Woodward
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0b7b28a ]

          SOLR-8837: Fix duplicate election node detection

          Show
          jira-bot ASF subversion and git services added a comment - Commit 0b7b28a04157f4a74020ea79a29ad74c280f137f in lucene-solr's branch refs/heads/branch_5x from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0b7b28a ] SOLR-8837 : Fix duplicate election node detection
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 55ac1ab95819f307f8056f8ddffbdd349ea51247 in lucene-solr's branch refs/heads/branch_5_5 from Alan Woodward
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=55ac1ab ]

          SOLR-8837: Fix duplicate election node detection

          Show
          jira-bot ASF subversion and git services added a comment - Commit 55ac1ab95819f307f8056f8ddffbdd349ea51247 in lucene-solr's branch refs/heads/branch_5_5 from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=55ac1ab ] SOLR-8837 : Fix duplicate election node detection
          Hide
          hossman Hoss Man added a comment -

          Manually correcting fixVersion per Step #S6 of LUCENE-7271

          Show
          hossman Hoss Man added a comment - Manually correcting fixVersion per Step #S6 of LUCENE-7271

            People

            • Assignee:
              romseygeek Alan Woodward
              Reporter:
              romseygeek Alan Woodward
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development