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.