hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yu Li (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-18441) ZookeeperWatcher#interruptedException should throw exception
Date Mon, 24 Jul 2017 04:59:00 GMT
Yu Li created HBASE-18441:

             Summary: ZookeeperWatcher#interruptedException should throw exception
                 Key: HBASE-18441
                 URL: https://issues.apache.org/jira/browse/HBASE-18441
             Project: HBase
          Issue Type: Bug
            Reporter: Yu Li

Currently Zookeeper#interruptedException will swallow the InterruptedException and only log,
which might cause unexpected behavior, such as when invoking {{ZKUtil#checkExists}} and the
watcher thread somehow interrupted, the method will return -1 which means the checked znode
doesn't exist, while actually the znode exists.

We could also see a TODO tag in the javadoc, which indicates we need some fix/improvement
   * Handles InterruptedExceptions in client calls.
   * <p>
   * This may be temporary but for now this gives one place to deal with these.
   * <p>
   * TODO: Currently, this method does nothing.
   *       Is this ever expected to happen?  Do we abort or can we let it run?
   *       Maybe this should be logged as WARN?  It shouldn't happen?
   * <p>
   * @param ie

Here we propose to throw a {{KeeperException$SystemErrorException}} in {{ZookeeperWatcher#interruptedException}},
and will add a UT case to cover the interruption scenario.

This message was sent by Atlassian JIRA

View raw message