Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-9157

ZKUtil.blockUntilAvailable loops forever with non-recoverable errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.98.8, 0.99.2
    • Zookeeper
    • None
    • Reviewed

    Description

      In one of integration test, I observed that a thread keeps spinning error logs "Unexpected exception handling blockUntilAvailable" due to KeeperException.ConnectionLossException. Below is the related code:

          
          while (!finished) {
            try {
              data = ZKUtil.getData(zkw, znode);
            } catch(KeeperException e) {
              LOG.warn("Unexpected exception handling blockUntilAvailable", e);
            }
      
            if (data == null && (System.currentTimeMillis() +
              HConstants.SOCKET_RETRY_WAIT_MS < endTime)) {
              Thread.sleep(HConstants.SOCKET_RETRY_WAIT_MS);
            } else {
              finished = true;
            }
          }
      

      ConnectionLossException might be recoverable but SessionExpiredException and AuthFailed are not recoverable errors, the while loop can't break.

      Attachments

        1. hbase-9157.patch
          0.8 kB
          Jeffrey Zhong
        2. hbase-9157-v2.patch
          0.9 kB
          Jeffrey Zhong

        Activity

          People

            jeffreyz Jeffrey Zhong
            jeffreyz Jeffrey Zhong
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: