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.

        Attachments

          Activity

            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: