[ 
https://issues.apache.org/jira/browse/HBASE-9167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13745038#comment-13745038
 ] 

Nicolas Liochon commented on HBASE-9167:
----------------------------------------

I think I'm +1 with this patch. I'm looking at the code in trunk and I fear 
there are race conditions: if multiple operations have different timeouts they 
may end up with the socket timeout of another operations. I guess it's the same 
problem in 0.94 and it's not new. So the patch is fine, just that we may have 
other issues if we set the timeout to something different than integer.max. The 
code in trunk around this is really complex.
                
> ServerCallable retries just once if timeout is not integer.max
> --------------------------------------------------------------
>
>                 Key: HBASE-9167
>                 URL: https://issues.apache.org/jira/browse/HBASE-9167
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 0.94.10
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>             Fix For: 0.94.12
>
>         Attachments: 0.94-9167.patch, 0.94-9167_v2.patch
>
>
> If callTimeout is not integer.max and throwable is not 
> SocketTimeoutException, we set the callTimeout to a negative value since 
> endTime is not set yet.  Therefore, the next call will always throw 
> SocketTimeoutException.
> {noformat}
>     if (this.callTimeout != HConstants.DEFAULT_HBASE_CLIENT_OPERATION_TIMEOUT)
>       if (throwable instanceof SocketTimeoutException
>           || (this.endTime - this.startTime > this.callTimeout)) {
>         throw (SocketTimeoutException) (SocketTimeoutException) new 
> SocketTimeoutException(
>             "Call to access row '" + Bytes.toString(row) + "' on table '"
>                 + Bytes.toString(tableName)
>                 + "' failed on socket timeout exception: " + throwable)
>             .initCause(throwable);
>       } else {
>    ===>     this.callTimeout = ((int) (this.endTime - this.startTime));
>       }
> {noformat}

--
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

Reply via email to