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

errors from creating ZK offline node are not handled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      Quote from HBASE-7799

      What i observed was

      try {
            ZKAssign.asyncCreateNodeOffline(watcher, state.getRegion(),
              destination, cb, state);
          } catch (KeeperException e) {
            if (e instanceof NodeExistsException) {
              LOG.warn("Node for " + state.getRegion() + " already exists");
            } else {
              server.abort("Unexpected ZK exception creating/setting node OFFLINE", e);
            }
            return false;
          }
      return true;
      

      The asyncCreateNodeOffline just always returns true because it does not wait for the callback to take action. Also the callback does not throw NodeExistsException.

      In short the catch block is a dead code.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sershe Sergey Shelukhin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: