hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nkeywal (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-7756) Strange code in ServerCallable#shouldRetry
Date Tue, 05 Feb 2013 12:51:18 GMT

     [ https://issues.apache.org/jira/browse/HBASE-7756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

nkeywal updated HBASE-7756:
---------------------------

       Resolution: Fixed
    Fix Version/s: 0.96.0
           Status: Resolved  (was: Patch Available)
    
> Strange code in ServerCallable#shouldRetry
> ------------------------------------------
>
>                 Key: HBASE-7756
>                 URL: https://issues.apache.org/jira/browse/HBASE-7756
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 0.96.0, 0.94.4
>            Reporter: nkeywal
>            Assignee: nkeywal
>             Fix For: 0.96.0
>
>         Attachments: 7756.v1.patch, 7756.v2.patch
>
>
> 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).
> {code}
>   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));
>       }
>   }
> {code}
> 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 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message