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

Strange code in ServerCallable#shouldRetry

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.94.4, 0.95.2
    • 0.95.0
    • Client
    • None
    • Reviewed

    Description

      This code is strange.
      If you configure a different value for HBASE_CLIENT_OPERATION_TIMEOUT, you can have only one socket timeout (whatever your setting for the socket timeout). If not, the first time we will retry (again, whatever your setting and the real timeout).

        public void shouldRetry(Throwable throwable) throws IOException {
          if (this.callTimeout != HConstants.DEFAULT_HBASE_CLIENT_OPERATION_TIMEOUT)
            if (throwable instanceof SocketTimeoutException
                || (this.endTime - this.startTime > this.callTimeout)) {
              throw (SocketTimeoutException) new SocketTimeoutException(
                  "Call to access row '" + Bytes.toString(row) + "' on table '"
                      + Bytes.toString(tableName)
                      + "' failed on socket timeout exception: " + throwable + " this.callTimeout="+this.callTimeout + " time= "+(this.endTime - this.startTime))
                  .initCause(throwable);
            } else {
              this.callTimeout = ((int) (this.endTime - this.startTime));
            }
        }
      

      I don't get all the implications yet, but for sure it's too smart to be good, and, at least, breaks my tests for HBASE-7590

      Attachments

        1. 7756.v2.patch
          5 kB
          Nicolas Liochon
        2. 7756.v1.patch
          4 kB
          Nicolas Liochon

        Issue Links

          Activity

            People

              nkeywal Nicolas Liochon
              nkeywal Nicolas Liochon
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: