[
https://issues.apache.org/jira/browse/HBASE-10637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13918367#comment-13918367
]
Nicolas Liochon commented on HBASE-10637:
-----------------------------------------
the connection is protected by a lock (a synchronized). So, today the first
thread which needs a new connection setup the streams. the code is:
clientThead: getConnection() -> setupStream -> write
since 10525
clientThead: getConnection() -> setupStream -> post message to writerThread
writerThread: write
with this patch
clientThead: getConnection() -> post message to writerThread
writerThread: setupStream -> write
So you can interrupt the client thread: it does not touch the tcp connection.
the pre 10525 being kept by default (with the allowsInterrupt option)
> rpcClient: Setup the iostream when doing the write
> --------------------------------------------------
>
> Key: HBASE-10637
> URL: https://issues.apache.org/jira/browse/HBASE-10637
> Project: HBase
> Issue Type: Bug
> Components: Client
> Affects Versions: 0.99.0
> Reporter: Nicolas Liochon
> Assignee: Nicolas Liochon
> Fix For: 0.99.0, hbase-10070
>
> Attachments: 10637.v1.patch
>
>
> Since HBASE-10525, we can write in a different thread than the client. This
> allows the client thread to be interrupted w/o any impact on the shared tcp
> connection. We should setup the iostream on the second thread as well, i.e.
> when we do the write, and not when we do the getConnection.
--
This message was sent by Atlassian JIRA
(v6.2#6252)