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

Log the underlying RPC exception in RpcRetryingCallerImpl

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2.0
    • 1.3.0, 2.0.0
    • None
    • None
    • Reviewed

    Description

      In RpcRetryingCallerImpl:

        public T callWithRetries(RetryingCallable<T> callable, int callTimeout)
        throws IOException, RuntimeException {
      ...
          for (int tries = 0;; tries++) {
            try {
      ...
              return callable.call(getTimeout(callTimeout));
      ...
            } catch (Throwable t) {
              ExceptionUtil.rethrowIfInterrupt(t);
              if (tries > startLogErrorsCnt) {
                LOG.info("Call exception, tries=" + tries + ", maxAttempts=" + maxAttempts + ", started="
                    + (EnvironmentEdgeManager.currentTime() - tracker.getStartTime()) + " ms ago, "
                    + "cancelled=" + cancelled.get() + ", msg="
                    + callable.getExceptionMessageAdditionalDetail());
              }
      ...
      

      We log the callable.getExceptionMessageAdditionalDetail() msg. But callable.getExceptionMessageAdditionalDetail() may not provide the underlying cause..

      For example, in AbstractRegionServerCallable,

        public String getExceptionMessageAdditionalDetail() {
          return "row '" + Bytes.toString(row) + "' on table '" + tableName + "' at " + location;
        }
      

      Let's add the underlying exception cause to the message as well.

      Attachments

        1. HBASE-16149-branch-1.patch
          2 kB
          Jerry He
        2. HBASE-16149.patch
          2 kB
          Jerry He

        Activity

          People

            jinghe Jerry He
            jinghe Jerry He
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: