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

Fix missing InterruptedException handling in ZkStateReader

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.1, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      I was debugging a zk session expired issue and saw this stack-trace

      ERROR - 2016-03-03 06:55:53.873; [   ] org.apache.solr.common.SolrException; OverseerAutoReplicaFailoverThread had an error in its thread work loop.:org.apache.solr.common.SolrException: Error reading cluster properties
      	at org.apache.solr.common.cloud.ZkStateReader.getClusterProps(ZkStateReader.java:738)
      	at org.apache.solr.cloud.OverseerAutoReplicaFailoverThread.doWork(OverseerAutoReplicaFailoverThread.java:153)
      	at org.apache.solr.cloud.OverseerAutoReplicaFailoverThread.run(OverseerAutoReplicaFailoverThread.java:132)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.InterruptedException: sleep interrupted
      	at java.lang.Thread.sleep(Native Method)
      	at org.apache.solr.common.cloud.ZkCmdExecutor.retryDelay(ZkCmdExecutor.java:108)
      	at org.apache.solr.common.cloud.ZkCmdExecutor.retryOperation(ZkCmdExecutor.java:76)
      	at org.apache.solr.common.cloud.SolrZkClient.exists(SolrZkClient.java:308)
      	at org.apache.solr.common.cloud.ZkStateReader.getClusterProps(ZkStateReader.java:731)
      	... 3 more
      

      So I audited ZKStateReader and found a couple of places where an InterruptedException was caught but the interrupt flag wasn't set back.

      1. SOLR-8779.patch
        3 kB
        Varun Thacker

        Activity

        Hide
        varunthacker Varun Thacker added a comment -

        Simple patch which sets the interrupt flag back in ZkStateReader#readConfigName , ZkStateReader#getClusterProps , ZkStateReader#setClusterProperty and ZkStateReader#getSecurityProps

        Show
        varunthacker Varun Thacker added a comment - Simple patch which sets the interrupt flag back in ZkStateReader#readConfigName , ZkStateReader#getClusterProps , ZkStateReader#setClusterProperty and ZkStateReader#getSecurityProps
        Hide
        dragonsinth Scott Blum added a comment -

        LGTM

        Show
        dragonsinth Scott Blum added a comment - LGTM
        Hide
        varunthacker Varun Thacker added a comment -

        Thanks Scott for the review!

        I'll commit this soon.

        Hi Nicholas Knize , this is a bug . It's fine if I commit it to the 6_0 branch as well?

        Show
        varunthacker Varun Thacker added a comment - Thanks Scott for the review! I'll commit this soon. Hi Nicholas Knize , this is a bug . It's fine if I commit it to the 6_0 branch as well?
        Hide
        nknize Nicholas Knize added a comment -

        this is a bug . It's fine if I commit it to the 6_0 branch as well?

        +1

        Show
        nknize Nicholas Knize added a comment - this is a bug . It's fine if I commit it to the 6_0 branch as well? +1
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 21bf9c6e8045adce3301a7a92766f9c43a49ba71 in lucene-solr's branch refs/heads/master from Varun Thacker
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=21bf9c6 ]

        SOLR-8779: Fix missing InterruptedException handling in ZkStateReader

        Show
        jira-bot ASF subversion and git services added a comment - Commit 21bf9c6e8045adce3301a7a92766f9c43a49ba71 in lucene-solr's branch refs/heads/master from Varun Thacker [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=21bf9c6 ] SOLR-8779 : Fix missing InterruptedException handling in ZkStateReader
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1cbf22569a38add32eae22b38d5f02257ada3fed in lucene-solr's branch refs/heads/branch_6x from Varun Thacker
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=1cbf225 ]

        SOLR-8779: Fix missing InterruptedException handling in ZkStateReader

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1cbf22569a38add32eae22b38d5f02257ada3fed in lucene-solr's branch refs/heads/branch_6x from Varun Thacker [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=1cbf225 ] SOLR-8779 : Fix missing InterruptedException handling in ZkStateReader
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 45ddc181486c15022577b23f37e6bded1dadeef7 in lucene-solr's branch refs/heads/branch_6_0 from Varun Thacker
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=45ddc18 ]

        SOLR-8779: Fix missing InterruptedException handling in ZkStateReader

        Show
        jira-bot ASF subversion and git services added a comment - Commit 45ddc181486c15022577b23f37e6bded1dadeef7 in lucene-solr's branch refs/heads/branch_6_0 from Varun Thacker [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=45ddc18 ] SOLR-8779 : Fix missing InterruptedException handling in ZkStateReader
        Hide
        anshumg Anshum Gupta added a comment -

        backport for 5.5.1

        Show
        anshumg Anshum Gupta added a comment - backport for 5.5.1
        Hide
        anshumg Anshum Gupta added a comment -

        branch_5x

        commit 1ce5e533c551bf04fd256cd945be2cb9a261f069
        Author: Varun Thacker <varunthacker1989@gmail.com>
        Date:   Fri Mar 4 18:08:53 2016 +0530
        
            SOLR-8779: Fix missing InterruptedException handling in ZkStateReader
        

        branch_5_5

        commit 6024572a53fc3af8fbb2f3d0cf51cf46d7406350
        Author: Varun Thacker <varunthacker1989@gmail.com>
        Date:   Fri Mar 4 18:08:53 2016 +0530
        
            SOLR-8779: Fix missing InterruptedException handling in ZkStateReader
        
        Show
        anshumg Anshum Gupta added a comment - branch_5x commit 1ce5e533c551bf04fd256cd945be2cb9a261f069 Author: Varun Thacker <varunthacker1989@gmail.com> Date: Fri Mar 4 18:08:53 2016 +0530 SOLR-8779: Fix missing InterruptedException handling in ZkStateReader branch_5_5 commit 6024572a53fc3af8fbb2f3d0cf51cf46d7406350 Author: Varun Thacker <varunthacker1989@gmail.com> Date: Fri Mar 4 18:08:53 2016 +0530 SOLR-8779: Fix missing InterruptedException handling in ZkStateReader

          People

          • Assignee:
            varunthacker Varun Thacker
            Reporter:
            varunthacker Varun Thacker
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development