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

Nicolas Liochon commented on HBASE-10472:
-----------------------------------------

bq. I guess we need this for checking the meta location from zk right? 
Yes. 
bq. Do we need that to be interruptible as well?
If the API is synchronous, it needs to be interruptible...

bq. I guess we might need it if we ever want to go meta replicas. 
Actually, we need it already, for example because a split task can be 
interrupted. Some HBase code relies on being interruptible already. With 
replicas, or without replica, you may want to rely on this to free the handlers 
(for example, if we get stuck on a region, we may use all the handlers of the 
region server today: if the client cancels the query interrupting the call does 
help).

bq. We are not setting the interrupted flag for the thread in 
ReplicationPeersZKImpl, ZKLeaderManager
If we throw an exception, it means that we took care of the interruption, so we 
don't need to reset the interrupt flag (and should not). If we abort the 
server, we can consider that we took care of the interruption. Keeping the 
thread interrupted could mean interrupting the abort, which may not be what was 
expected.

bq.  Can we get away with some of the changes, if we keep the original 
ZKUtil.getData() and have ZKUtil.getDataInterruptible() ? 
Not really, imho: we need the code to be clean when there are interruptions. 
ZooKeeper API is clean. Our wrapping is not clean today.

> Manage the interruption in ZKUtil#getData
> -----------------------------------------
>
>                 Key: HBASE-10472
>                 URL: https://issues.apache.org/jira/browse/HBASE-10472
>             Project: HBase
>          Issue Type: Bug
>          Components: Client, master, regionserver
>    Affects Versions: 0.98.0, 0.99.0
>            Reporter: Nicolas Liochon
>            Assignee: Nicolas Liochon
>             Fix For: 0.98.1, 0.99.0
>
>         Attachments: 10472.v1.patch, 10472.v2.patch
>
>
> Many, but not all, methods in ZKUtil partly hides the interruption: they 
> return null or something like that. Many times, this will result in a NPE, or 
> something undefined. 
> This jira is limited to the getData to keep things small enough (it's used in 
> hbase-client code).
> The code is supposed to behave at least 'as well as before', or better 
> (hopefully).
> It could be included in a later .98 release (98.1) and in .99



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to